Open tobbi opened 5 years ago
Parser rules do not always return null
if an error occurred (it attempts to recover from errors). There should be a property of ctx
you can check to see if an error occurred. There are other options as well:
BailErrorListener
to throw an exception if an error occurs
I have specified the following grammar: https://pastebin.com/mzwv0czc
I'm testing it out with the following C# code:
The input is as follows:
G:238859 == G:238859 > 100
Because I specified a mandatory
EOF
token after theformel
rule, theplausiregel
formula should be null because the input string does not match due to trailing garbage after theformel
rule. However, only theEOF
token is null.Am I incorrect with my assessment?