%lex-param is not working
Timothy Krause <[email protected]>
| Newsgroups | gmane.comp.parsers.bison.general |
|---|---|
| Message-ID | <CAK8or-sEQecKsQLzhjf-f7WSoDF_5w29RJr_azAAq8O7TRwT2Q@mail.gmail.com> |
In the bison source file I have
%lex-param { ps->scaninfo }
When I compile the parser I get:
parser.tab.cpp: In function ‘int yyparse(parse_state*)’:
parser.tab.cpp:1689:41: error: ‘scaninfo’ was not declared in this scope;
did you mean ‘scanf’?
1689 | yychar = yylex (&yylval, &yylloc, scaninfo);
The 'ps->' is missing.
Is this the correct use of %lex-param? Is there a better way to specify the
parameter?
Thanks for your time and consideration?
Tim