mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
doc: formatting changes
* doc/bison.texi: here.
This commit is contained in:
@@ -5780,26 +5780,24 @@ This is similar to how most shells resolve commands.
|
|||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Directive} %token-table
|
@deffn {Directive} %token-table
|
||||||
Generate an array of token names in the parser implementation file.
|
Generate an array of token names in the parser implementation file. The
|
||||||
The name of the array is @code{yytname}; @code{yytname[@var{i}]} is
|
name of the array is @code{yytname}; @code{yytname[@var{i}]} is the name of
|
||||||
the name of the token whose internal Bison token code number is
|
the token whose internal Bison token code number is @var{i}. The first
|
||||||
@var{i}. The first three elements of @code{yytname} correspond to the
|
three elements of @code{yytname} correspond to the predefined tokens
|
||||||
predefined tokens @code{"$end"}, @code{"error"}, and
|
@code{"$end"}, @code{"error"}, and @code{"$undefined"}; after these come the
|
||||||
@code{"$undefined"}; after these come the symbols defined in the
|
symbols defined in the grammar file.
|
||||||
grammar file.
|
|
||||||
|
|
||||||
The name in the table includes all the characters needed to represent
|
The name in the table includes all the characters needed to represent the
|
||||||
the token in Bison. For single-character literals and literal
|
token in Bison. For single-character literals and literal strings, this
|
||||||
strings, this includes the surrounding quoting characters and any
|
includes the surrounding quoting characters and any escape sequences. For
|
||||||
escape sequences. For example, the Bison single-character literal
|
example, the Bison single-character literal @code{'+'} corresponds to a
|
||||||
@code{'+'} corresponds to a three-character name, represented in C as
|
three-character name, represented in C as @code{"'+'"}; and the Bison
|
||||||
@code{"'+'"}; and the Bison two-character literal string @code{"\\/"}
|
two-character literal string @code{"\\/"} corresponds to a five-character
|
||||||
corresponds to a five-character name, represented in C as
|
name, represented in C as @code{"\"\\\\/\""}.
|
||||||
@code{"\"\\\\/\""}.
|
|
||||||
|
|
||||||
When you specify @code{%token-table}, Bison also generates macro
|
When you specify @code{%token-table}, Bison also generates macro definitions
|
||||||
definitions for macros @code{YYNTOKENS}, @code{YYNNTS}, and
|
for macros @code{YYNTOKENS}, @code{YYNNTS}, and @code{YYNRULES}, and
|
||||||
@code{YYNRULES}, and @code{YYNSTATES}:
|
@code{YYNSTATES}:
|
||||||
|
|
||||||
@table @code
|
@table @code
|
||||||
@item YYNTOKENS
|
@item YYNTOKENS
|
||||||
@@ -12651,10 +12649,10 @@ the generated parser, so use @samp{%define parse.trace} explicitly if
|
|||||||
needed. Also, in the future the @code{%token-table} directive might enable
|
needed. Also, in the future the @code{%token-table} directive might enable
|
||||||
a public interface to access the token names and codes.
|
a public interface to access the token names and codes.
|
||||||
|
|
||||||
Getting a ``code too large'' error from the Java compiler means the code
|
Getting a ``code too large'' error from the Java compiler means the code hit
|
||||||
hit the 64KB bytecode per method limitation of the Java class file.
|
the 64KB bytecode per method limitation of the Java class file. Try
|
||||||
Try reducing the amount of code in actions and static initializers;
|
reducing the amount of code in actions and static initializers; otherwise,
|
||||||
otherwise, report a bug so that the parser skeleton will be improved.
|
report a bug so that the parser skeleton will be improved.
|
||||||
|
|
||||||
|
|
||||||
@node Java Semantic Values
|
@node Java Semantic Values
|
||||||
@@ -14124,8 +14122,8 @@ Bison declaration to declare token(s) without specifying precedence.
|
|||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Directive} %token-table
|
@deffn {Directive} %token-table
|
||||||
Bison declaration to include a token name table in the parser
|
Bison declaration to include a token name table in the parser implementation
|
||||||
implementation file. @xref{Decl Summary}.
|
file. @xref{Decl Summary}.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Directive} %type
|
@deffn {Directive} %type
|
||||||
@@ -14145,9 +14143,9 @@ values. @xref{Union Decl}.
|
|||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Macro} YYABORT
|
@deffn {Macro} YYABORT
|
||||||
Macro to pretend that an unrecoverable syntax error has occurred, by
|
Macro to pretend that an unrecoverable syntax error has occurred, by making
|
||||||
making @code{yyparse} return 1 immediately. The error reporting
|
@code{yyparse} return 1 immediately. The error reporting function
|
||||||
function @code{yyerror} is not called. @xref{Parser Function}.
|
@code{yyerror} is not called. @xref{Parser Function}.
|
||||||
|
|
||||||
For Java parsers, this functionality is invoked using @code{return YYABORT;}
|
For Java parsers, this functionality is invoked using @code{return YYABORT;}
|
||||||
instead.
|
instead.
|
||||||
|
|||||||
Reference in New Issue
Block a user