Why the generated parser code tolerates illegal expression?

Skip to end of metadata
Go to start of metadata

Considering below grammar, the generated parser code tolerates illegal expression like "NotExpression1 ANND NotExpression2", the parser just ignores the part "ANND NotExpression2". The solution is to explicitly declare EOF at the end of constraint definition. i.e. constraint: orexpression EOF;

Labels: