Initial project gives error on empty file
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
This has been solved in nightly.
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.
Spoofax 2.1 does not give a parse error on an empty file, even when the language does not include the empty word.
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