An action_part containing code for the action to be performed when we
reduce with this production.
A hash table to implement the set.
Collection of all states.
Table of all non-terminals -- elements are stored using name strings
as the key
Table of all productions.
A hash table to hold the set.
Table of all non terminals indexed by their index number.
Table of all terminals indexed by their index number.
Hash table to find states by their kernels (i.e, the original,
unclosed, set of items -- which uniquely define the state).
The production we were taken out of.
String containing code for the action in question.
The position of the "dot" -- this indicates the part of the production
that the marker is before, so 0 indicates a dot at the beginning of
the RHS.
Bitset to implement the actual set.
First set for this non-terminal.
First set of the production.
Index of this state in the parse tables
Index number of the production.
Index of this symbol (terminal or non terminal) in the parse tables.
The item set for this state.
Optional label for referring to the part within an action (null for
no label).
The left hand side non-terminal.
The lookahead symbols of the item.
String for the human readable name of the symbol.
Next transition in linked list of transitions out of a state
Nullability of this non terminal.
Nullability of the production (can it derive the empty string).
Is the nullability of the production known or unknown?
Count of number of reductions using this production.
How many rows/states are in the machine/table.
How many rows/states in the machine/table.
The symbol we make the transition on.
Table of all productions with this non terminal on the LHS.
Links to items that the lookahead needs to be propagated to.
The production we reduce with.
A collection of parts for the right hand side.
How much of the right hand side array we are presently using.
The precedence of the rule
Number of columns (terminals) in every row.
Number of columns (non terminals) in every row.
String for the type of object used for the symbol on the parse stack.
Cache of symbol after the dot.
The production for the item.
The symbol that this part is made up of.
The state we transition to.
List of transitions out of this state.
Count of how many times the symbol appears in productions.
An action_part containing code for the action to be performed when we
reduce with this production.
User declarations for direct inclusion in user action class.
Time to produce action code class.
This class represents a part of a production which contains an
action.
A specialized version of a production used when we split an existing
production in order to remove an embedded action.
Resulting parse action table.
Time to produce the action table.
Add a singleton item, merging lookahead sets if the item is already
part of the set.
Add a complete set, merging lookaheads where items are already in
the set
Add a single symbol to the set.
Add (union) in a complete set.
Add a single terminal to the set.
Add (union) in a complete set.
Add a production to our set of productions.
Add a new item to the set of items we propagate to.
Add a transition out of this state to another.
Access to all elements of the set.
Collection of all states.
Access to all non-terminals.
Access to all productions.
Access to all elements of the set.
Calculate lookahead representing symbols that could appear after the
symbol that the dot is currently in front of.
Timing data -- when did we end checking
Update (and return) the first set based on current NT firsts.
Check to see if the production (now) appears to be nullable.
Check the table to ensure that all productions have been reduced.
Check for unused symbols.
TUM changes; proposed by Henning Niss 20050628: Type arguments for class declaration
Close various files used by the system.
String containing code for the action in question.
Compute the closure of the set using the LALR closure rules.
Compute the default (reduce) action for this row and store it in
default_reduce.
Compute first sets for all non-terminals.
Compute nullability of all non-terminals.
Given its index determine if the set contains a particular terminal.
Does the set contain a particular item?
Determine if the set contains a particular symbol.
Determine if the set contains a particular terminal.
Equality comparison for the core only.
Hash code for the core (separated so we keep non overridden version).
Method called to do a forced error exit on an internal error
for cases when we can't actually throw the exception.
Declare label names as valid variables within the action string
Default (reduce) action for this row.
Emit the reduce-goto table.
Is the dot at the end of the production?
Determine if we have a dot before a non terminal, and if so which one
(return null or the non terminal).
The position of the "dot" -- this indicates the part of the production
that the marker is before, so 0 indicates a dot at the beginning of
the RHS.
Timing data -- when did we end dumping
Produce a human readable dump of the grammar.
Produce a (semi-) human readable dump of the complete viable prefix
recognition state machine.
Helper routine for debugging -- produces a dump of the given state
onto System.out.
Produce a (semi-) human readable dumps of the parse tables
This class handles emitting generated code for the resulting parser.
Emit code for the non-public class holding the actual action code.
Timing data -- when did we finish emitting code
Error message format:
ERRORLEVEL at (LINE/COLUMN)@SYMBOL: MESSAGE
ERRORLEVEL : MESSAGE
Emit a package spec if the user wants one.
Call the emit routines necessary to write out the generated parser.
Emit the production table.
Emit a long summary message to standard error (System.err) which
summarizes what was found in the specification, how many states were
produced, how many conflicts were found, etc.
Constant for the empty set.
Determine if the set is empty.
Special terminal for end of input.
Equality comparison for properly typed object.
Equality comparison -- here we only require the cores to be equal since
we need to do sets of items based only on core equality (ignoring
lookahead sets).
Generic equality comparison.
Generic equality comparison.
Generic equality comparison.
Generic equality comparison.
Generic equality comparison.
Generic equality comparison.
Generic equality comparison.
Generic equality comparison.
Generic equality comparison.
Generic equality comparison.
Constant for action type -- error action.
special terminal used for error recovery
User option -- number of conflicts to expect
Timing data -- when were we completely done
Lookup a non terminal by index.
Lookup a production by index.
Lookup a terminal by index.
Return the item in the set matching a particular item (or null if not
found)
lookup a non terminal by name string
Lookup a terminal by name string.
Find and return state with a given a kernel item set (or null if not
found).
Timing data -- when did we end first set calculation
First set for this non-terminal.
First set of the production.
Procedure that attempts to fix a shift/reduce error by using
precedences.
List of imports (Strings containing class names) to go with actions.
User option -- should we include non terminal symbol numbers in the
symbol constant class.
Index of this state in the parse tables
Index number of the production.
Index of this symbol (terminal or non terminal) in the parse tables.
User code for user_init() which is called during parser initialization.
Exception subclass for reporting internal errors in JavaCup.
Constructor with a message
Determine if this set intersects another.
Override to report this object as an action.
Indicate if this is an action (rather than a symbol).
Respond that we are not an action part.
flag non-terminals created to embed action productions
Determine if a character can be in a label id.
Determine if a given character can be a label id starter.
Indicate that this symbol is a non-terminal.
Indicate if this is a non-terminal.
Report this symbol as not being a non-terminal.
Is this set an (improper) subset of another?
Determine if this set is an (improper) subset of another.
Determine if this set is an (improper) subset of another.
Is this set an (improper) superset of another?
Determine if this set is an (improper) superset of another.
Determine if this set is an (improper) superset of another.
The item set for this state.
Optional label for referring to the part within an action (null for
no label).
This class represents an LALR item.
Constructor with default position and empty lookahead set.
Constructor with default position (dot at start).
This class represents a set of LALR items.
Constructor for an empty set.
Constructor for cloning from another set.
This class represents a state in the LALR viable prefix recognition machine.
Constructor for building a state from a set of items.
This class represents a transition in an LALR viable prefix recognition
machine.
Constructor with null next.
The left hand side non-terminal.
The lookahead symbols of the item.
Determine if everything from the symbol one beyond the dot all the
way to the end of the right hand side is nullable.
Test to see if this non terminal currently looks nullable.
The "core" of an LR item.
Constructor for dot at start of right hand side.
User option -- should generator generate code for left/right values?
whether or not to emit code for left and right values
Timing data -- when did we end state machine construction
This class serves as the main driver for the JavaCup system.
The main driver for the system.
The major version number.
Return label declaration code
Helper routine to merge adjacent actions in a set of RHS parts
The minor version number.
String for the human readable name of the symbol.
Flag to indicate that this item needs to propagate its lookahead
(whether it has changed or not).
Next transition in linked list of transitions out of a state
Static counter for assigning unique state indexes.
Static counter to assign unique indexes.
Static counter for assigning unique index numbers.
Static counter to assign unique index.
Static counter for creating unique non-terminal names
User option -- do not print a summary.
This class represents a non-terminal symbol in the grammar.
Constructor with default type.
Constants for action type -- reduce action.
This class represents a shift/reduce nonassociative error within the
parse table.
Helper function for null test.
Helper function to test for a null object and throw an exception
if one is found.
Helper function to test for a null object and throw an exception if
one is found.
Count of the number on non-reduced productions found.
Increment the count of reductions with this non-terminal
Timing data -- when did we end nullability calculation
Nullability of this non terminal.
Nullability of the production (can it derive the empty string).
Is the nullability of the production known or unknown?
Number of conflict found while building tables.
Total number of productions with this non terminal on the LHS.
Count of number of reductions using this production.
How many rows/states are in the machine/table.
How many rows/states in the machine/table.
Indicate total number of states there are.
Total number of non-terminals.
Total number of productions.
Total number of terminals.
Return the hash code that object would have provided for us so we have
a (nearly) unique id for debugging.
The symbol we make the transition on.
Open various files used by the system.
User option -- do we compact tables by making most common reduce the
default action
User option -- do we run produce extra debugging messages
User option -- do we produce a dump of the grammar
User option -- do we produce a dump of the state machine
User option -- do we produce a dump of the parse tables
User option -- do we show timing information as a part of the summary
Package that the resulting code goes into (null is used for unnamed).
This class serves as the base class for entries in a parse action table.
This class represents one row (corresponding to one machine state) of the
parse action table.
This class represents the complete "action" table of the parser.
Parse command line options and arguments to set various user-option
flags and variables.
Timing data -- when did we end parsing
Parse the grammar specification from standard input.
This class represents one row (corresponding to one machine state) of the
reduce-goto parse table.
This class represents the complete "reduce-goto" table of the parser.
Emit the parser subclass with embedded tables.
Output file for the parser class.
Name of the generated parser class.
User declarations for direct inclusion in parser class.
Time to produce parser class.
Helper routine to optionally return a plural or non-plural ending.
Build a string with the standard prefix.
Access to the precedence of the rule
get the precedence of a terminal
The prefix placed on names that pollute someone else's name space.
Timing data -- when did we end preliminaries
User option -- do we print progress messages.
This class represents a production in the grammar.
Constructor with no action string.
This class represents one part (either a symbol or an action) of a
production.
Time to produce the production table.
Access to productions with this non terminal on the LHS.
The command name normally used to invoke this program
Propagate lookahead sets through the constructed viable prefix
recognizer.
Links to items that the lookahead needs to be propagated to
Propagate lookahead sets out of this state.
Propagate incoming lookaheads through this item to others need to
be changed.
Constants for action type -- reduce action.
This class represents a reduce action within the parse table.
Timing data -- when did we end checking for non-reduced productions
Resulting reduce-goto table.
The production we reduce with.
Table of reduction counts (reused by compute_default()).
Remove a single item if it is in the set.
Remove (set subtract) a complete set.
Remove a single symbol if it is in the set.
Remove (set subtract) a complete set.
Remove a terminal if it is in the set.
Remove all embedded actions from a production by factoring them
out into individual action production using new non terminals.
Produce warning messages for all conflicts found in this state.
Produce a warning message for one reduce/reduce conflict.
Produce a warning message for one shift/reduce conflict.
Access to the collection of parts for the right hand side.
How much of the right hand side array we are presently using.
User code for scan() which is called to get the next Symbol.
set the precedence of a terminal
Setting the precedence of a rule
Constant for action type -- shift action.
Produce the new lalr_item that results from shifting the dot one position
to the right.
This class represents a shift action within the parse table.
Produce a new lr_item_core that results from shifting the dot one
position to the right.
Produce the optional timing summary as part of an overall summary.
Number of columns (terminals) in every row.
Number of columns (non terminals) in every row.
String for the type of object used for the symbol on the parse stack.
special non-terminal for start symbol
The start production of the grammar.
Start state in the overall state machine.
Timing data -- when did we start
Helper routine to strip a trailing action off rhs and return it
User option -- should generator suppress references to
java_cup.runtime.Scanner for compatibility with old runtimes?
User option -- should symbols be put in a class or an interface? [CSA]
This abstract class serves as the base class for grammar symbols (i.e.,
both terminals and non-terminals).
Constructor with default type.
Return the symbol after the dot.
Output file for the symbol constant class.
Name of the generated class for symbol constants.
This class represents a part of a production which is a symbol (terminal
or non terminal).
Constructor with no label.
This class represents a set of symbols and provides a series of
set operations to manipulate them.
Constructor for an empty set.
Constructor for cloning from another set.
Emit code for the symbol constant class, optionally including non terms,
if they have been requested.
Time to produce symbol constant class.
Timing data -- when did we end table construction
This class represents a terminal symbol in the grammar.
Constructor with default type.
Constructor for non-precedented terminal
A set of terminals implemented as a bitset.
Constructor for an empty set.
Constructor for cloning from another set.
The production for the item.
The symbol that this part is made up of.
Helper routine to format a decimal based display of seconds and
percentage of total time given counts of milliseconds.
Convert to a string (separated out from toString() so we can call it
from subclass that overrides toString()).
Convert to a simpler string.
The state we transition to.
List of transitions out of this state.
TUM changes; proposed by Henning Niss 20050628
Build a string with the specified type arguments,
if present, otherwise an empty string.
Actual entries for the row.
Actual array of rows, one per state.
Actual array of rows, one per state
Actual action entries for the row.
Count of unused non terminals.
Count of unused terminals.
Print a "usage message" that described possible command line options,
then exit.
Count of how many times the symbol appears in productions.