An useful feature would be to allow keywords to be recognizes by the AST generator or not.
Currently, all keywords are also made into AST leafs:
start$ : "test" = test;
This will become an ast-node "prog" with a leaf "test". The keyword is always recognized and turned as part of the AST.
A possible solution: The double quotation mark, likewise in Tokay, might specify if a keyword should become part of the AST, otherwise it is ignored.
start$ : ""test"" = prog; // creates one AST node "prog" with the keyword "test" as leaf
start$ : "test" = prog; // creates one AST node (leaf) "prog". The keyword is ignored.
This solution is only a minor enhancement to the syntax but might break existing grammars when they use the AST feature. Little effort would be required to fix these.
An useful feature would be to allow keywords to be recognizes by the AST generator or not.
Currently, all keywords are also made into AST leafs:
This will become an ast-node "prog" with a leaf "test". The keyword is always recognized and turned as part of the AST.
A possible solution: The double quotation mark, likewise in Tokay, might specify if a keyword should become part of the AST, otherwise it is ignored.
This solution is only a minor enhancement to the syntax but might break existing grammars when they use the AST feature. Little effort would be required to fix these.