help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Is there a replacement for yychar


From: Matthias Simon
Subject: Is there a replacement for yychar
Date: Thu, 11 Dec 2014 19:17:06 +0100
User-agent: Roundcube Webmail/0.7.1

Hi,

I have a problem compiling my parser generated by Bison 3.0.2. For error recovery I use the lookahead variable `yychar' like this:

...
| error { if (yychar != '}' && yychar != ';') yyclearin; else yyerrok; }
    ;

But in commit 39be90223b73a42d249f99cdf283c4ab46a10a21 this variable was removed from $parser_class_name::parse(), which means my grammar does not compile for recent bison releases anymore. Is there a replacement for `yychar', which also works for older bison versions, like 2.7? The manual still mentions `yychar', and suggests nothing there and I am little clueless. I could workaround that within my buildsystem, but I would prefer keeping things simple.

Cheers,

Matthias





reply via email to

[Prev in Thread] Current Thread [Next in Thread]