Error recovery. Leave terminal in stack

Mar 12, 2013 at 7:01 PM
Hello! I am trying to create grammar for sql with good error handling.
The question is how to leave last terminal in error rule in stack?

For example, i have next sql statement:

select a,b bAlias errorSymbol,c from table

I have errorRule for column: SyntaxError+","

So, when parsing sample statement, parser recovers error, but when recovering it "eats" ",".
How can i leave "," on stack so after recovering it starts from it?
Mar 14, 2013 at 2:53 AM
I'm afraid I have no recipe for you - in the current implementation of error recovery, that's the way it works.
Will definitely look into this in the next iteration.