Previous: , Up: Bison Options   [Contents][Index]


9.1.4 Output Files

Options controlling the output.

-H [file]
--header=[file]

Pretend that %header was specified, i.e., write an extra output file containing definitions for the token kind names defined in the grammar, as well as a few other declarations. See Bison Declaration Summary.

--defines[=file]

Historical name for option --header before Bison 3.8.

-d

This is the same as --header except -d does not accept a file argument since POSIX Yacc requires that -d can be bundled with other short options.

-b file-prefix
--file-prefix=prefix

Pretend that %file-prefix was specified, i.e., specify prefix to use for all Bison output file names. See Bison Declaration Summary.

-r things
--report=things

Write an extra output file containing verbose description of the comma separated list of things among:

state

Description of the grammar, conflicts (resolved and unresolved), and parser’s automaton.

itemset

Implies state and augments the description of the automaton with the full set of items for each state, instead of its core only.

lookahead

Implies state and augments the description of the automaton with each rule’s lookahead set.

solved

Implies state. Explain how conflicts were solved thanks to precedence and associativity directives.

counterexamples
cex

Look for counterexamples for the conflicts. See Generation of Counterexamples. Counterexamples take time to compute. The option -rcex should be used by the developer when working on the grammar; it hardly makes sense to use it in a CI.

all

Enable all the items.

none

Do not generate the report.

--report-file=file

Specify the file for the verbose description.

-v
--verbose

Pretend that %verbose was specified, i.e., write an extra output file containing verbose descriptions of the grammar and parser. See Bison Declaration Summary.

-o file
--output=file

Specify the file for the parser implementation file.

The names of the other output files are constructed from file as described under the -v and -d options.

-g [file]
--graph[=file]

Output a graphical representation of the parser’s automaton computed by Bison, in Graphviz DOT format. file is optional. If omitted and the grammar file is foo.y, the output file will be foo.gv.

-x [file]
--xml[=file]

Output an XML report of the parser’s automaton computed by Bison. file is optional. If omitted and the grammar file is foo.y, the output file will be foo.xml.

-M old=new
--file-prefix-map=old=new

Replace prefix old with new when writing file paths in output files.


Previous: Tuning the Parser, Up: Bison Options   [Contents][Index]