User:OrenBochman/ParserNG/Preprocessor Antlr

The Preprocessor
This is a Preprocessor spec in ANTLR

EBNF DEFS
The following difinitions a referenced

//based on

EOF and broken xxx rules
As mentioned in the EBNF speck it inefficent to run a test till the end of file fpr on closed tokens. Antlr offers some remedies. However issue is not so well explained.

The problem with ]]  is a poor choice since it looks like a syntax error. If we consider it is easier to see that the inner most element should be evaluated before the outer ones. Inner most element also starts furthest on the right. If we consider it seemes that the parse tree should become or something like:
 * where:
 * | are pipes
 * /\ are branches
 * null are empty place holders

once it is parsed it should than be processed and inverted into an AST by further tree building rules.