13.7.4 Bison – a better Yacc
Several packages provide a Yacc-compatible LALR parser generator in Debian:
-
bison
: GNU LALR parser generator
-
byacc
: The Berkeley LALR parser generator
-
btyacc
: Backtracking parser generator based on byacc
References for bison
:
-
info bison (tutorial)
-
bison(1)
You need to provide your own main()
and yyerror()
.
main()
calls yyparse()
which calls
yylex()
, usually created with FleX.
%%
%%