mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-12 22:03:02 +00:00
Really update refcard.tex...
This commit is contained in:
@@ -19,7 +19,7 @@
|
|||||||
\def\finalout{\overfullrule=0pt}
|
\def\finalout{\overfullrule=0pt}
|
||||||
%\finalout
|
%\finalout
|
||||||
|
|
||||||
% Copyright (c) 1998 Free Software Foundation, Inc.
|
% Copyright (c) 1998, 2001 Free Software Foundation, Inc.
|
||||||
%
|
%
|
||||||
% This file is part of Bison.
|
% This file is part of Bison.
|
||||||
%
|
%
|
||||||
@@ -66,11 +66,11 @@
|
|||||||
% We only change the following to change the version numbers and
|
% We only change the following to change the version numbers and
|
||||||
% such.
|
% such.
|
||||||
|
|
||||||
\def\bisonversion{1.20} % the bison version
|
\def\bisonversion{1.31} % the bison version
|
||||||
|
|
||||||
\def\refcardversion{0.4a} % reference card version
|
\def\refcardversion{0.5} % reference card version
|
||||||
\def\month{August} % month
|
\def\month{November} % month
|
||||||
\def\year{1998} % year
|
\def\year{2001} % year
|
||||||
\def\version{\month\ \year, Bison Refcard Version \refcardversion}
|
\def\version{\month\ \year, Bison Refcard Version \refcardversion}
|
||||||
|
|
||||||
% for copyright notices
|
% for copyright notices
|
||||||
@@ -316,10 +316,13 @@ Options can be used as: \kbd{bison {\it options} {\it filename}}
|
|||||||
\section{Command Line Options}
|
\section{Command Line Options}
|
||||||
%*****************************
|
%*****************************
|
||||||
|
|
||||||
|
\key{Display usage information.} {-h}
|
||||||
|
\key{Display version information.} {-V}
|
||||||
\key{Generate token and {\tt YYSTYPE} definitions.} {-d}
|
\key{Generate token and {\tt YYSTYPE} definitions.} {-d}
|
||||||
|
\key{Prepend a prefix to external symbols.} {-p {\it prefix}}
|
||||||
\key{Don't put {\tt \#line} directives in the parser.} {-l}
|
\key{Don't put {\tt \#line} directives in the parser.} {-l}
|
||||||
\key{Specify the output file.} {-o {\it filename}}
|
\key{Specify the output file.} {-o {\it filename}}
|
||||||
\key{Debug or {\it trace} mode.} {-t}
|
\key{Debug or {\it trace} mode.} {-t}
|
||||||
\key{Verbose description of the parser.} {-v}
|
\key{Verbose description of the parser.} {-v}
|
||||||
\key{Emulate {\tt yacc} (generate {\tt y.tab.*} files).} {-y}
|
\key{Emulate {\tt yacc} (generate {\tt y.tab.*} files).} {-y}
|
||||||
|
|
||||||
@@ -362,8 +365,8 @@ definition, {\it n} is a {\it terminal} symbol name, {\it m} is a
|
|||||||
\vskip .10truein
|
\vskip .10truein
|
||||||
|
|
||||||
The {\tt <{\it t\/}>} after {\tt \%token, \%left, \%right} and {\tt
|
The {\tt <{\it t\/}>} after {\tt \%token, \%left, \%right} and {\tt
|
||||||
\%nonassoc} is optional. Additionally, precedence may be overridden with
|
\%nonassoc} is optional. Additionally, precedence may be overridden
|
||||||
embedded {\tt \%prec} commands.
|
in the rules with {\tt \%prec} commands.
|
||||||
|
|
||||||
\section{Parser Definition Files}
|
\section{Parser Definition Files}
|
||||||
%*********************************
|
%*********************************
|
||||||
@@ -397,6 +400,7 @@ The general form for a parser definition is:
|
|||||||
|
|
||||||
Rules take the form:
|
Rules take the form:
|
||||||
|
|
||||||
|
\vskip -\baselineskip
|
||||||
\beginexample
|
\beginexample
|
||||||
non-terminal : {\it statement} 1
|
non-terminal : {\it statement} 1
|
||||||
| {\it statement} 2
|
| {\it statement} 2
|
||||||
@@ -439,15 +443,17 @@ For example:
|
|||||||
\key{Access data associated with a symbol.} {\$\$, \$0\dots\${\it n}}
|
\key{Access data associated with a symbol.} {\$\$, \$0\dots\${\it n}}
|
||||||
\key{Access a field of the data union.} {\$\$.{\it t},
|
\key{Access a field of the data union.} {\$\$.{\it t},
|
||||||
\$0.{\it t}\dots\${\it n}.{\it t}}
|
\$0.{\it t}\dots\${\it n}.{\it t}}
|
||||||
\key{Access data's line position.} {@{\it n}.{\it line\_spec}}
|
\key{Access symbol's location.} {@\$, @0\dots@{\it n}}
|
||||||
\key{Access data's column position.} {@{\it n}.{\it column\_spec}}
|
\key{Access data's line location.} {@{\it x}.{\it line\_spec}}
|
||||||
|
\key{Access data's column location.} {@{\it x}.{\it column\_spec}}
|
||||||
|
|
||||||
|
|
||||||
\vskip .10truein
|
\vskip .10truein
|
||||||
|
%
|
||||||
Where {\it t} is a type defined in the {\tt \%union}, {\it n} is a
|
Where {\it t} is a type defined in the {\tt \%union}, {\it n} is a
|
||||||
number, {\it line\_spec} one of {\tt first_line} and {\tt last_line},
|
number, {\it x} is a number or \$, {\it line\_spec} one of {\tt
|
||||||
and {\it column\_spec} is specified as either {\tt first_column} or {\tt
|
first_line} and {\tt last_line}, and {\it column\_spec} is specified
|
||||||
last_column}.
|
as either {\tt first_column} or {\tt last_column}.
|
||||||
|
|
||||||
\section {Variables and Types}
|
\section {Variables and Types}
|
||||||
%*****************************
|
%*****************************
|
||||||
|
|||||||
Reference in New Issue
Block a user