Here is a summary of all Bison declarations:
%union
%token
%right
%left
%nonassoc
%type
%start
%expect
%pure_parser
%no_lines
#line
preprocessor commands in the parser
file. Ordinarily Bison writes these commands in the parser file so that
the C compiler and debuggers will associate errors and object code with
your source file (the grammar file). This directive causes them to
associate errors with the parser file, treating it an independent source
file in its own right.
%raw
%token_table
yytname
; yytname[i]
is the name of the
token whose internal Bison token code number is i. The first three
elements of yytname
are always "$"
, "error"
, and
"$illegal"
; after these come the symbols defined in the grammar
file.
For single-character literal tokens and literal string tokens, the name
in the table includes the single-quote or double-quote characters: for
example, "'+'"
is a single-character literal and "\"<=\""
is a literal string token. All the characters of the literal string
token appear verbatim in the string found in the table; even
double-quote characters are not escaped. For example, if the token
consists of three characters `*"*', its string in yytname
contains `"*"*"'. (In C, that would be written as
"\"*\"*\""
).
When you specify %token_table
, Bison also generates macro
definitions for macros YYNTOKENS
, YYNNTS
, and
YYNRULES
, and YYNSTATES
:
YYNTOKENS
YYNNTS
YYNRULES
YYNSTATES
Go to the first, previous, next, last section, table of contents.