blob: 630997558a15ccce180040d239b07f177d722a50 [file] [log] [blame]
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.40.10.
.TH BISON "1" "December 2012" "bison 2.7" "User Commands"
bison \- GNU Project parser generator (yacc replacement)
.B bison
[\fIOPTION\fR]... \fIFILE\fR
.I Bison
is a parser generator in the style of
.IR yacc (1).
It should be upwardly compatible with input files designed
.IR yacc .
Input files should follow the
.I yacc
convention of ending in
.BR .y .
.IR yacc ,
the generated files do not have fixed names, but instead use the prefix
of the input file.
Moreover, if you need to put
.I C++
code in the input file, you can end his name by a C++-like extension
(.ypp or .y++), then bison will follow your extension to name the
output file (.cpp or .c++).
For instance, a grammar description file named
.B parse.yxx
would produce the generated parser in a file named
.BR ,
instead of
.IR yacc 's
or old
.I Bison
.BR .
This description of the options that can be given to
.I bison
is adapted from the node
.B Invocation
in the
.B bison.texinfo
manual, which should be taken as authoritative.
.I Bison
supports both traditional single-letter options and mnemonic long
option names. Long option names are indicated with
.B \-\-
instead of
.BR \- .
Abbreviations for option names are allowed as long as they
are unique. When a long option takes an argument, like
.BR \-\-file-prefix ,
connect the option name and the argument with
.BR = .
Generate a deterministic LR or generalized LR (GLR) parser employing
LALR(1), IELR(1), or canonical LR(1) parser tables. IELR(1) and
canonical LR(1) support is experimental.
Mandatory arguments to long options are mandatory for short options too.
The same is true for optional arguments.
.SS "Operation modes:"
\fB\-h\fR, \fB\-\-help\fR
display this help and exit
\fB\-V\fR, \fB\-\-version\fR
output version information and exit
output directory containing locale\-dependent data
output directory containing skeletons and XSLT
\fB\-y\fR, \fB\-\-yacc\fR
emulate POSIX Yacc
\fB\-W\fR, \fB\-\-warnings\fR[=\fICATEGORY\fR]
report the warnings falling in CATEGORY
\fB\-f\fR, \fB\-\-feature\fR[=\fIFEATURE\fR]
activate miscellaneous features
.SS "Parser:"
\fB\-L\fR, \fB\-\-language\fR=\fILANGUAGE\fR
specify the output programming language
\fB\-S\fR, \fB\-\-skeleton\fR=\fIFILE\fR
specify the skeleton to use
\fB\-t\fR, \fB\-\-debug\fR
instrument the parser for debugging
enable location support
\fB\-D\fR, \fB\-\-define=NAME\fR[=\fIVALUE\fR]
similar to '%define NAME "VALUE"'
\fB\-F\fR, \fB\-\-force\-define=NAME\fR[=\fIVALUE\fR]
override '%define NAME "VALUE"'
\fB\-p\fR, \fB\-\-name\-prefix\fR=\fIPREFIX\fR
prepend PREFIX to the external symbols
deprecated by '\-Dapi.prefix=PREFIX'
\fB\-l\fR, \fB\-\-no\-lines\fR
don't generate '#line' directives
\fB\-k\fR, \fB\-\-token\-table\fR
include a table of token names
.SS "Output:"
also produce a header file
likewise but cannot specify FILE (for POSIX Yacc)
\fB\-r\fR, \fB\-\-report\fR=\fITHINGS\fR
also produce details on the automaton
write report to FILE
\fB\-v\fR, \fB\-\-verbose\fR
same as `\-\-report=state'
\fB\-b\fR, \fB\-\-file\-prefix\fR=\fIPREFIX\fR
specify a PREFIX for output files
\fB\-o\fR, \fB\-\-output\fR=\fIFILE\fR
leave output to FILE
\fB\-g\fR, \fB\-\-graph\fR[=\fIFILE\fR]
also output a graph of the automaton
\fB\-x\fR, \fB\-\-xml\fR[=\fIFILE\fR]
also output an XML report of the automaton
(the XML schema is experimental)
.SS "Warning categories include:"
unset or unused midrule values
incompatibilities with POSIX Yacc
S/R conflicts (enabled by default)
R/R conflicts (enabled by default)
obsolete constructs
all other warnings (enabled by default)
all the warnings
turn off warnings in CATEGORY
turn off all the warnings
treat warnings as errors
.SS "THINGS is a list of comma separated words that can include:"
describe the states
complete the core item sets with their closure
explicitly associate lookahead tokens to items
describe shift/reduce conflicts solving
include all the above information
disable the report
.SS "FEATURE is a list of comma separated words that can include:"
show errors with carets
all of the above
disable all of the above
Written by Robert Corbett and Richard Stallman.
Report bugs to <bug\>.
GNU Bison home page: <>.
General help using GNU software: <>.
Report translation bugs to <>.
For complete documentation, run: info bison.
Copyright \(co 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
.BR lex (1),
.BR flex (1),
.BR yacc (1).
The full documentation for
.B bison
is maintained as a Texinfo manual. If the
.B info
.B bison
programs are properly installed at your site, the command
.B info bison
should give you access to the complete manual.