Skip to content

SExpParser.parseFile should return empty list on empty file #240

Description

@JohnReppy

Description of the problem

When SExpParser.parseFile parses an empty file, it will fail with:

uncaught exception Fail [Fail: error [empty:1.1]: parsing value, found '']

This is somewhat unexpected. An empty file has no s-expressions, so
SExpParser.parseFile should be returning an empty list instead. Returning an
empty list also has the advantage of making it possible to distinguish between
parsing errors and empty files.

Comments from smlnj-gforge

Original smlnj-gforge bug number 307

Submitted on 2022-32-14 at 00:3200

comment by @JohnReppy on 2022-18-31 16:1800 +000 UTC

Fixed for 110.99.3 and 2022.1

comment by @JohnReppy on 2022-52-11 18:5200 +000 UTC

Moved to feature requests

comment by @JohnReppy on 2022-52-11 18:5200 +000 UTC

Moved from Bugs to Feature Requests

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestfixed-in-2022.1Issues that have been closed for the 2022.1 releasegforgebug (or feature request) ported from smlnj-gforge repository

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions