This summary only include declarations specific to Java or have special meaning when used in a Java parser.
A parameter for the lexer class defined by
%code lexer
only, added as parameters to the lexer constructor and the parser constructor that creates a lexer. Default is none. See Java Scanner Interface.
The prefix of the parser class name prefix
Parser
if%define parser_class_name
is not used. Default isYY
. See Java Bison Interface.
A parameter for the parser class added as parameters to constructor(s) and as fields initialized by the constructor(s). Default is none. See Java Parser Interface.
Declare tokens. Note that the angle brackets enclose a Java type. See Java Semantic Values.
Declare the type of nonterminals. Note that the angle brackets enclose a Java type. See Java Semantic Values.
Code appended to the inside of the parser class. See Java Differences.
Code inserted just after the
package
declaration. See Java Differences.
Code added to the body of a inner lexer class within the parser class. See Java Scanner Interface.
Code (after the second
%%
) appended to the end of the file, outside the parser class. See Java Differences.
Whether the parser class is declared
abstract
. Default is false. See Java Bison Interface.
The superclass of the parser class. Default is none. See Java Bison Interface.
Whether the parser class is declared
final
. Default is false. See Java Bison Interface.
The implemented interfaces of the parser class, a comma-separated list. Default is none. See Java Bison Interface.
The exceptions thrown by the
yylex
method of the lexer, a comma-separated list. Default isjava.io.IOException
. See Java Scanner Interface.
The name of the class used for locations (a range between two positions). This class is generated as an inner class of the parser class by bison. Default is
Location
. Formerly namedlocation_type
. See Java Location Values.
The package to put the parser class in. Default is none. See Java Bison Interface.
The name of the parser class. Default is
YYParser
or name-prefixParser
. See Java Bison Interface.
The name of the class used for positions. This class must be supplied by the user. Default is
Position
. Formerly namedposition_type
. See Java Location Values.
Whether the parser class is declared
public
. Default is false. See Java Bison Interface.
The base type of semantic values. Default is
Object
. See Java Semantic Values.
Whether the parser class is declared
strictfp
. Default is false. See Java Bison Interface.
The exceptions thrown by user-supplied parser actions and
%initial-action
, a comma-separated list. Default is none. See Java Parser Interface.