Re: glr-parser hands me the wrong token

Hans Ã…berg <[email protected]> Sun, 9 Apr 2023 10:29:27 +0200
Newsgroups gmane.comp.parsers.bison.bugs
Message-ID <[email protected]>
> On 9 Apr 2023, at 00:43, Adam Wozniak <[email protected]> wrote:
>=20
> On inspection, i think the problem is not Bison, but my lack of
> understanding of the rule of yytext.
> (i should be using yylval instead)

The Flex lexer only produces a pointer to a buffer which will change on =
subsequent reads, so if using the string it points to, it is necessary =
hand over a copy of it to the Bison parser.