Fix documentation problems reported by Tim Josling at

<http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
* NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
* doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
integers.  Explain the effect of literal string aliases on error
messages.  Copy token 0 documentation from the C++ skeleton
documentation.
This commit is contained in:
Joel E. Denny
2008-02-17 02:47:53 +00:00
parent ab7f29f8f9
commit b1cc23c4e3
3 changed files with 25 additions and 2 deletions

View File

@@ -1,3 +1,13 @@
2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
Fix documentation problems reported by Tim Josling at
<http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
* NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
* doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
integers. Explain the effect of literal string aliases on error
messages. Copy token 0 documentation from the C++ skeleton
documentation.
2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu> 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
Accept a token number in a %left, %right, or %nonassoc for POSIX Accept a token number in a %left, %right, or %nonassoc for POSIX

3
NEWS
View File

@@ -158,6 +158,9 @@ Changes in version 2.3a+ (????-??-??):
by POSIX. However, see the end of section `Operator Precedence' in the Bison by POSIX. However, see the end of section `Operator Precedence' in the Bison
manual for a caveat concerning the treatment of literal strings. manual for a caveat concerning the treatment of literal strings.
* The nonfunctional --no-parser, -n, and %no-parser options have been
completely removed from Bison.
Changes in version 2.3a, 2006-09-13: Changes in version 2.3a, 2006-09-13:
* Instead of %union, you can define and use your own union type * Instead of %union, you can define and use your own union type

View File

@@ -4023,7 +4023,7 @@ associativity and precedence. @xref{Precedence Decl, ,Operator
Precedence}. Precedence}.
You can explicitly specify the numeric code for a token type by appending You can explicitly specify the numeric code for a token type by appending
a decimal or hexadecimal integer value in the field immediately a nonnegative decimal or hexadecimal integer value in the field immediately
following the token name: following the token name:
@example @example
@@ -4076,6 +4076,16 @@ Once you equate the literal string and the token name, you can use them
interchangeably in further declarations or the grammar rules. The interchangeably in further declarations or the grammar rules. The
@code{yylex} function can use the token name or the literal string to @code{yylex} function can use the token name or the literal string to
obtain the token type code number (@pxref{Calling Convention}). obtain the token type code number (@pxref{Calling Convention}).
Syntax error messages passed to @code{yyerror} from the parser will reference
the literal string instead of the token name.
The token numbered as 0 corresponds to end of file; the following line
allows for nicer error messages referring to ``end of file'' instead
of ``$end'':
@example
%token END 0 "end of file"
@end example
@node Precedence Decl @node Precedence Decl
@subsection Operator Precedence @subsection Operator Precedence