I have started working on bison parser recently, Below is portion of the parser file , which will be executed in the loop.
Program: Start statement Stop
{
...
...
...
}
How to skip execution of the current case if any syntax error occurs in statement section? and continue the execution with the loop again?
Program: Start statement Stop
{
I want to skip execution of this part ..if any syntax error occurs in
any of the rule section ( Start, statement and Stop)
}
I have tried adding error rule like below but it is not working as expected.
Program: Start statement Stop
{
....
...
...
}
| Program error Stop (// skip until Stop)
{
yyerrok;
}
what is the right way to handle the syntax error in this case? and continue the parsing?
Help is required here.
StartandStop? - rici