The %lex
and /lex
markers only delimit the section of the grammar that pertain to the scanner generator. The %lex
marker marks the start and /lex
marks the end.
When using bison
and flex
you'd put the lexer's definitions (the "scanner generator" in Jison parlance) in a .l
file and the grammar in a .y
file. I do not think there exist a way using bison
and flex
(or yacc/lex
) to combine the two files. (It has been a very long while since I've used bison
and flex
so it is not impossible that there's something I don't know.)
The fact is that although Jison takes inspiration from bison
and flex
, it is really an independent tool. So it does include features that have no equivalent in bison
or flex
.