Closed albertolovato closed 6 years ago
Added in 71846aa4250d3abe487fd860f6b8b324d9c4d503. Now the parser throws a RuntimeException
in case on any syntax error.
So from now on the syntax/grammar has to be 100% correct, or the parser will throw an exception. If you encounter such an exception with your COBOL code, please let me know so I can fix the grammar!
Parser errors that compromise subsequent parsing should throw an exception.
For example, when the parser logs the error
line 8:17 no viable alternative at input 'x <>'
for a condition with unrecognized operatorx <> 5
, the visitor finds non-existent sections at 8:15 and 8:20.