In the reentrant parser, we cannot easily extend the argument list for
yylex() using %lex-param. Instead, we must use a lex-extra pointer.
Signed-off-by: Karel Zak <kzak@redhat.com>
%{
#include "smartcolsP.h"
#include "filter-parser.h" /* define tokens (T_*) */
+
%}
%option reentrant bison-bridge noyywrap noinput nounput
+%option extra-type="struct libscols_filter *"
id [a-zA-Z][a-zA-Z_.%:/\-0-9]*
int [0-9]+
return -errno;
yylex_init(&sc);
+ yylex_init_extra(fltr, &sc);
yyset_in(fltr->src, sc);
rc = yyparse(sc, fltr);