Re: Is there a replacement for yychar

2015-01-15 Thread Matthias Simon
Hi Akim, On 2015-01-12 11:22, Akim Demaille wrote: However, can't you just avoid depending on yychar this way? Can't you pull out the yychar at the level of the rule itself? I hadn't thought of that, I like this solution. Thanks a lot Cheers, Matthias ___

Re: Is there a replacement for yychar

2015-01-12 Thread Akim Demaille
&& 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 replacemen

Re: Is there a replacement for yychar

2014-12-12 Thread Hans Aberg
> On 12 Dec 2014, at 14:13, Matthias Simon wrote: > > On 2014-12-12 12:51, Hans Aberg wrote: >>> if [ $($BISON --version | head 1 | ...) -lt 3 ]; then >>> write_header_config "#define yychar yyla.type” >>> fi >> >> Right. It might suffice to put it directly in the .yy file, as later >> versio

Re: Is there a replacement for yychar

2014-12-12 Thread Matthias Simon
On 2014-12-12 12:51, Hans Aberg wrote: if [ $($BISON --version | head 1 | ...) -lt 3 ]; then write_header_config "#define yychar yyla.type” fi Right. It might suffice to put it directly in the .yy file, as later version do not seem to have yychar. Whereas later versions do not have yychar, o

Re: Is there a replacement for yychar

2014-12-12 Thread Hans Aberg
> On 12 Dec 2014, at 07:35, Matthias Simon wrote: > >> It is probably best to stick to the newer version only, to avoid bugs. > Sadly, that is not really an option for me (due to outdated targets, high > variety of developer-machines, difficulties with non-standard > installations,...). Hence,

Re: Is there a replacement for yychar

2014-12-11 Thread Matthias Simon
It is probably best to stick to the newer version only, to avoid bugs. Sadly, that is not really an option for me (due to outdated targets, high variety of developer-machines, difficulties with non-standard installations,...). Hence, I probably will workaround in the build-system like: if [ $

Re: Is there a replacement for yychar

2014-12-11 Thread Hans Aberg
&& 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

Is there a replacement for yychar

2014-12-11 Thread Matthias Simon
9cdf283c4ab46a10a21 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',