glr2.cc: get rid of the macros wrapping the lookahead
commit321fac219371053497a5680f6a34707e30fd1e6c
authorAkim Demaille <akim.demaille@gmail.com>
Sun, 27 Dec 2020 07:18:34 +0000 (27 08:18 +0100)
committerAkim Demaille <akim.demaille@gmail.com>
Sun, 27 Dec 2020 07:34:49 +0000 (27 08:34 +0100)
tree97f7234eca8b5d0ebdc7ddfba35b9d1867b6f847
parent2777b7316641691dc810ac5287df370b57a2d3d3
glr2.cc: get rid of the macros wrapping the lookahead

In glr.c, the macros yychar, yylval and yylloc allow to deal with
api.pure: sometimes they point to global variables (impure), sometimes
they point to the member variables (pure).

There's no room for globals in glr2.cc.  Besides, they map yychar to
yyrawchar, yylval to yyval, etc. which obfuscates what is actually
going on.

* data/skeletons/glr2.cc (glr_stack::yyval, glr_stack::yyloc): Rename
as...
(glr_stack::yylval, glr_stack::yylloc): these, for clarity.
(yynerrs, yychar, yylval, yylloc, yystackp): Remove these macros.
(b4_yygetToken_call): Remove.
data/skeletons/glr2.cc