![]() |
|
Navigation |
Synopsis A syntax rule uses an undeclared non-terminal.
Description All non-terminals that occur in a Rascal:SyntaxDefinition should be declared in some rule.
This error is generated when this is not the case.
Remedy: declare the offending non-terminal.
Examples Here is an example where the non-terminal
Y is not declared:
rascal>import ParseTree; ok rascal>syntax X = "a" Y; ok rascal>parse(#X, "ab"); |stdin:///|(10,4,<1,10>,<1,14>): Undeclared non-terminal: Y in module ___SCREEN_INSTANCE___
Pitfalls The source location of the non-terminal is not yet available, so the error message mentions the module in which this occurs.
![]() |