mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-16 15:53:03 +00:00
Add new options.
This commit is contained in:
51
doc/bison.1
51
doc/bison.1
@@ -12,10 +12,18 @@ bison \- GNU Project parser generator (yacc replacement)
|
|||||||
] [
|
] [
|
||||||
.B \-\-defines
|
.B \-\-defines
|
||||||
] [
|
] [
|
||||||
|
.B \-k
|
||||||
|
] [
|
||||||
|
.B \-\-token-table
|
||||||
|
] [
|
||||||
.B \-l
|
.B \-l
|
||||||
] [
|
] [
|
||||||
.B \-\-no-lines
|
.B \-\-no-lines
|
||||||
] [
|
] [
|
||||||
|
.B \-n
|
||||||
|
] [
|
||||||
|
.B \-\-no-parser
|
||||||
|
] [
|
||||||
.BI \-o " outfile"
|
.BI \-o " outfile"
|
||||||
] [
|
] [
|
||||||
.BI \-\-output-file= outfile
|
.BI \-\-output-file= outfile
|
||||||
@@ -24,6 +32,10 @@ bison \- GNU Project parser generator (yacc replacement)
|
|||||||
] [
|
] [
|
||||||
.BI \-\-name-prefix= prefix
|
.BI \-\-name-prefix= prefix
|
||||||
] [
|
] [
|
||||||
|
.B \-r
|
||||||
|
] [
|
||||||
|
.B \-\-raw
|
||||||
|
] [
|
||||||
.B \-t
|
.B \-t
|
||||||
] [
|
] [
|
||||||
.B \-\-debug
|
.B \-\-debug
|
||||||
@@ -128,6 +140,33 @@ in a separate source file, because
|
|||||||
needs to be able to refer to token type codes and the variable
|
needs to be able to refer to token type codes and the variable
|
||||||
.BR yylval .
|
.BR yylval .
|
||||||
.TP
|
.TP
|
||||||
|
.B \-r
|
||||||
|
.br
|
||||||
|
.ns
|
||||||
|
.TP
|
||||||
|
.B \-\-raw
|
||||||
|
The token numbers in the \fIname\fB.h\fR file are usually the Yacc compatible
|
||||||
|
translations. If this switch is specified, Bison token numbers
|
||||||
|
are output instead. (Yacc numbers start at 257 except for single character
|
||||||
|
tokens; Bison assigns token numbers sequentially for all tokens
|
||||||
|
starting at 3.)
|
||||||
|
.TP
|
||||||
|
.B \-k
|
||||||
|
.br
|
||||||
|
.ns
|
||||||
|
.TP
|
||||||
|
.B \-\-token-table
|
||||||
|
This switch causes the \fIname\fB.tab.c\fR output to include a list of
|
||||||
|
token names in order by their token numbers; this is defined in the array
|
||||||
|
.IR yytname .
|
||||||
|
Also generated
|
||||||
|
are #defines for
|
||||||
|
.IR YYNTOKENS ,
|
||||||
|
.IR YYNNTS ,
|
||||||
|
.IR YYNRULES ,
|
||||||
|
and
|
||||||
|
.IR YYNSTATES .
|
||||||
|
.TP
|
||||||
.B \-l
|
.B \-l
|
||||||
.br
|
.br
|
||||||
.ns
|
.ns
|
||||||
@@ -143,6 +182,17 @@ and debuggers will associate errors with your source file, the
|
|||||||
grammar file. This option causes them to associate errors with the
|
grammar file. This option causes them to associate errors with the
|
||||||
parser file, treating it an independent source file in its own right.
|
parser file, treating it an independent source file in its own right.
|
||||||
.TP
|
.TP
|
||||||
|
.B \-n
|
||||||
|
.br
|
||||||
|
.ns
|
||||||
|
.TP
|
||||||
|
.B \-\-no-parser
|
||||||
|
Do not generate the parser code into the output; generate only
|
||||||
|
declarations. The generated \fIname\fB.tab.c\fR file will have only
|
||||||
|
constant declarations. In addition, a \fIname\fB.act\fR file is
|
||||||
|
generated containing a switch statement body containing all the
|
||||||
|
translated actions.
|
||||||
|
.TP
|
||||||
.BI \-o " outfile"
|
.BI \-o " outfile"
|
||||||
.br
|
.br
|
||||||
.ns
|
.ns
|
||||||
@@ -290,4 +340,3 @@ in the
|
|||||||
source distribution.
|
source distribution.
|
||||||
.SH DIAGNOSTICS
|
.SH DIAGNOSTICS
|
||||||
Self explanatory.
|
Self explanatory.
|
||||||
|
|
||||||
|
|||||||
@@ -4,10 +4,7 @@
|
|||||||
.! This is a RUNOFF input file which will produce a VMS help file
|
.! This is a RUNOFF input file which will produce a VMS help file
|
||||||
.! for the VMS HELP library.
|
.! for the VMS HELP library.
|
||||||
.!
|
.!
|
||||||
.! Date of last revision: June 21, 1992
|
.! Eric Youngdale and Wilfred J. Hansen (wjh+@cmu.edu).
|
||||||
.!
|
|
||||||
.!
|
|
||||||
.! Eric Youngdale
|
|
||||||
.!
|
.!
|
||||||
.literal
|
.literal
|
||||||
.end literal
|
.end literal
|
||||||
@@ -47,7 +44,10 @@ foo_tab.c.
|
|||||||
/FIXED_OUTFILES
|
/FIXED_OUTFILES
|
||||||
/NAME_PREFIX=prefix
|
/NAME_PREFIX=prefix
|
||||||
/NOLINES
|
/NOLINES
|
||||||
|
/NOPARSER
|
||||||
/OUTPUT=outfilefile
|
/OUTPUT=outfilefile
|
||||||
|
/RAW
|
||||||
|
/TOKEN_TABLE
|
||||||
/VERBOSE
|
/VERBOSE
|
||||||
/VERSION
|
/VERSION
|
||||||
/YACC
|
/YACC
|
||||||
@@ -122,7 +122,15 @@ Ordinarily Bison puts them in the parser file so that the C compiler
|
|||||||
and debuggers will associate errors with your source file, the
|
and debuggers will associate errors with your source file, the
|
||||||
grammar file. This option causes them to associate errors with the
|
grammar file. This option causes them to associate errors with the
|
||||||
parser file, treating it an independent source file in its own right.
|
parser file, treating it an independent source file in its own right.
|
||||||
|
.skip
|
||||||
|
.indent -1
|
||||||
|
2 /NOPARSER
|
||||||
|
.skip
|
||||||
|
Do not generate the parser code into the output; generate only
|
||||||
|
declarations. The generated name_tab.c file will have only
|
||||||
|
constant declarations. In addition, a name.act file is
|
||||||
|
generated containing a switch statement body containing all the
|
||||||
|
translated actions.
|
||||||
.skip
|
.skip
|
||||||
.indent -1
|
.indent -1
|
||||||
2 /OUTPUT
|
2 /OUTPUT
|
||||||
@@ -132,6 +140,22 @@ parser file, treating it an independent source file in its own right.
|
|||||||
.end literal
|
.end literal
|
||||||
.skip
|
.skip
|
||||||
Specify the name "outfile" for the parser file.
|
Specify the name "outfile" for the parser file.
|
||||||
|
.skip
|
||||||
|
.indent -1
|
||||||
|
2 /RAW
|
||||||
|
.skip
|
||||||
|
When this switch is specified, the .tab.h file defines the tokens to
|
||||||
|
have the bison token numbers rather than the yacc compatible numbers.
|
||||||
|
To employ this switch you would have to have your own parser.
|
||||||
|
.skip
|
||||||
|
.indent -1
|
||||||
|
2 /TOKEN_TABLE
|
||||||
|
.skip
|
||||||
|
This switch causes the name_tab.c output to include a list of
|
||||||
|
token names in order by their token numbers; this is defined in the array
|
||||||
|
yytname. Also generated are #defines for YYNTOKENS, YYNNTS, YYNRULES,
|
||||||
|
and YYNSTATES.
|
||||||
|
|
||||||
.skip
|
.skip
|
||||||
.indent -1
|
.indent -1
|
||||||
2 /VERBOSE
|
2 /VERBOSE
|
||||||
|
|||||||
Reference in New Issue
Block a user