If the spoofaxc is configured to use a specific start symbol, but there is no [context-free] start-symbols entry for that symbol in the SDF3, parsing will fail with unclear errors.
Either an error during parsing that the start-symbol does not exist/was not registered as such, or parsing to succeed into Module("foo", []).
What actually happened
Multiple markers at this line
- Syntax error near unexpected character 'm'
- Unexpected end of file
- Analysis failed. Exception: mb.jsglr.common.JsglrParseExceptions$ParseFail: Parsing failed; see error messages Messages of eclipse-resource##/ministratego/test.mstr: ERROR 0-6@1: Syntax error near unexpected character 'm' ERROR 7-10@1: Unexpected end of file
Context
Spoofax version: devenv with spoofax-pie metaborg/spoofax-pie@389964a5
This could maybe be checked by inspecting the produced ParseTable and checking if it contains the start symbol, if the ParseTable API allows you to do that.
Summary
If the spoofaxc is configured to use a specific start symbol, but there is no
[context-free] start-symbols
entry for that symbol in the SDF3, parsing will fail with unclear errors.What you did
SDF3:
spoofaxc.cfg
:Test file:
What you expected to happen
Either an error during parsing that the start-symbol does not exist/was not registered as such, or parsing to succeed into
Module("foo", [])
.What actually happened
Context