Name
yacc
Synopsis
yacc [options] file
Given a file containing context-free grammar, convert file into tables for subsequent parsing and send output to y.tab.c. This command name stands for yet another compiler-compiler. See also flex, bison, and lex & yacc (O’Reilly).
Options
- -b prefix
Prepend prefix, instead of y, to the output file.
- -d
Generate y.tab.h, producing #define statements that relate yacc’s token codes to the token names declared by the user.
- -l
Exclude #line constructs from code produced in y.tab.c. (Use after debugging is complete.)
- -o outfile
Write generated code to outfile instead of the default y.tab.c.
- -p prefix
Change the symbol yacc uses for symbols it generates from the default yy to prefix.
- -r
Produce separate files for code and tables named y.code.c and y.tab.c, respectively.
- -t
Compile runtime debugging code.
- -v
Generate y.output, a file containing diagnostics and notes about the parsing tables.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access