Closed zhangjianxi2008 closed 5 years ago
You need to add an explicit EOF
to your entry rule. Otherwise, the parsing process is allowed to terminate before the end of the file if it means an error is avoided.
prog
: expr EOF
;
You need to add an explicit
EOF
to your entry rule. Otherwise, the parsing process is allowed to terminate before the end of the file if it means an error is avoided.prog : expr EOF ;
Thanks a lot for the trouble you've taken to help us! ^&^
Hello,
I'm trying to make a simple formula calculator, but in some cases it can't recognize grammatical errors. Can you help me figure out where the errors are?Thank you very much!
Here is my grammar:
And my test program (C#), showing the input stream:
Your help would be appreciated. Best regards,
ZJX.