After creating and building a new Spoofax project, opening a Spoofax editor for a new file results in an error The input is empty. While this is true, it should not be an error, since the defined language should contain the empty word. The editor correctly handles the file once you add layout, but cannot handle the empty file.

I am not sure if this is a Spoofax or an SDF3 issue, but it is an issue from a language designer's perspective.

Submitted by Guido Wachsmuth on 8 August 2016 at 11:49

On 8 August 2016 at 11:49 Gabriël Konat commented:

This has been solved in nightly.


On 8 August 2016 at 11:49 Gabriël Konat closed this issue.

On 19 January 2017 at 16:01 Guido Wachsmuth commented:

There is somehow still an issue in Spoofax 2.1. While the new file does not result in an error anymore, Show parsed AST yields () on an empty file, while it gives Empty() on a file containing some layout, e.g. a single space.


On 13 February 2017 at 09:50 Guido Wachsmuth commented:

Spoofax 2.1 does not give a parse error on an empty file, even when the language does not include the empty word.


On 16 February 2017 at 14:17 Gabriël Konat reopened this issue.

On 16 February 2017 at 14:17 Gabriël Konat tagged sdf

On 16 February 2017 at 14:17 Gabriël Konat tagged parser

On 16 February 2017 at 14:17 Gabriël Konat tagged @edesouzaamorim

On 17 February 2017 at 14:09 Eduardo Amorim commented:

I had a look and committed a fix (which was just deleting the workaround).
Let me know if things go wrong.

Log in to post comments