> It could be that using a parser based on IELR or LR fixes it. The default
> is LALR, which does not always see the error tokens immediately, but may
> perform some reductions first.

Thanks for the pointers, it really did help me to find the right solution.
While switching to LR parser indeed yielded expected results in the example,
I believe the thing that I was missing was enabling 'Lookahead Correction'
by the '%define parse.lac full' directive, which is in the manual section
that you mentioned. Having that, yypcontext_expected_tokens provides me with 
complete list of expected tokens regardless of 'lr.type'.

Regards,
Jan



Reply via email to