Paul Eggert <[EMAIL PROTECTED]> writes:
> What happens when you try this?
I get the same output as you up until the error recovery phase:
where you show
> syntax error, unexpected '+', expecting A or B
> Error: popping token '+' ()
> Error: popping nterm e ()
> Shifting token error ()
> Entering state 3
> Error: discarding token '+' ()
> Reading a token: Next token is token $end ()
> Error: discarding token $end ()
> Reading a token: Next token is token $end ()
> Cleanup: popping token error ()
> Cleanup: popping nterm program ()
> Cleanup: popping token $end ()
> Program exited with code 01.
I get
syntax error, unexpected '+', expecting A or B
Error: popping token '+' ()
Error: popping nterm e ()
Shifting token error ()
Entering state 3
Error: discarding token '+' ()
Reading a token: Next token is token $end ()
Error: discarding token $end ()
Reading a token: Next token is token $end ()
Error: discarding token $end ()
Reading a token: Next token is token ';' ()
Entering state 3
Shifting token ';' ()
Entering state 8
Reducing stack 0 by rule 3 (line 25):
$1 = nterm program ()
$2 = token error ()
$3 = token ';' ()
-> $$ = nterm program ()
Entering state 1
Reading a token: Next token is token $end ()
Shifting token $end ()
Entering state 2
Cleanup: popping token $end ()
Cleanup: popping nterm program ()
Cleanup: popping token $end ()
Program exited normally.
(gdb)
Not sure what to make of this, but happy to look where you tell me to.
regards, tom lane