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.
Internal flag to indicate when parser should quit.
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.
The default number of Symbols after an error we much match to consider
it recovered from.
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.
Character position in current line.
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.
Instance of action encapsulation class.
Instance of action encapsulation 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.
Direct reference to the action table.
Resulting parse action table.
The action table (supplied by generated subclass).
Access to parse-action table.
Access to 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.
Advance the scanner one character in the input stream.
Advance to next "parse ahead" input Symbol.
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.
Table of single character symbols.
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.
Close various files used by the system.
CODE - static field in class java_cup.
sym String containing code for the action in question.
COLON - static field in class java_cup.
sym COMMA - static field in class java_cup.
sym 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.
Return the current lookahead in our error "parse ahead" buffer.
The current lookahead Symbol.
Current line number for use in error messages.
Character position in current line.
Write a debugging message to System.err for the debugging version
of the parser.
Debugging version of next_token().
Perform a parse with debugging output.
Do debug output for a reduce.
Do debug output for shift.
Do debug output for stack state.
Declare label names as valid variables within the action string
Default (reduce) action for this row.
DIVIDE - static field in class java_cup.simple_calc.
sym Invoke a user supplied parse action.
Invoke a user supplied parse action.
Perform a bit of user supplied action code (supplied by generated
subclass).
Swallow up a code string.
Emit the reduce-goto table.
This method is called to indicate that the parser should quit.
DOT - static field in class java_cup.
sym 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.
Dump the parse stack for debugging purposes.
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
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.
Indicate whether the stack is empty.
EOF - static field in class java_cup.
sym EOF - static field in class java_cup.simple_calc.
sym Special terminal for end of input.
The index of the end of file terminal Symbol (supplied by generated
subclass).
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.
error - static field in class java_cup.
sym error - static field in class java_cup.simple_calc.
sym special terminal used for error recovery
Count of total errors detected so far.
Attempt to recover from a syntax error.
The index of the special error Symbol (supplied by generated subclass).
The number of Symbols after an error we much match to consider it
recovered from.
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.
Put the (real) parse stack into error recovery configuration by
popping the stack down to a state that can shift on the special
error Symbol, then doing the shift.
Try to look up a single character symbol, returns -1 for not found.
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.
ID - static field in class java_cup.
sym Determine if a character is ok for the middle of an id.
Determine if a character is ok to start an id.
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.
INIT - static field in class java_cup.
sym Initialize the action object.
Action encapsulation object initializer.
Action encapsulation object initializer.
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.
LEFT - static field in class java_cup.
sym
The data passed to parser
This class implements a small scanner (aka lexical analyzer or lexer) for
the JavaCup specification.
The left hand side non-terminal.
Lookahead Symbols used for attempting error recovery "parse aheads".
The lookahead symbols of the item.
Position in lookahead input buffer used for "parse ahead".
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.
LPAREN - static field in class java_cup.simple_calc.
sym The "core" of an LR item.
Constructor for dot at start of right hand side.
This class implements a skeleton table driven LR parser.
Constructor that sets the default scanner.
User option -- should generator generate code for left/right values?
whether or not to emit code for left and right values
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
First character of lookahead.
Second character of lookahead.
Second character of lookahead.
Second character of lookahead.
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
Return the next token, or null
on end-of-file.
Return the next token, or null
on end-of-file.
User option -- do not print a summary.
NON - static field in class java_cup.
sym 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.
NUMBER - static field in class java_cup.simple_calc.
sym 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 method provides the main parsing routine.
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.
Parse forward using stored lookahead Symbols.
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.
The parse state to be recorded on the parse stack with this symbol.
CUP v0.10k generated parser.
CUP v0.10k generated parser.
Constructor which sets the default scanner.
Constructor which sets the default scanner.
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.
PLUS - static field in class java_cup.simple_calc.
sym 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.
Direct reference to the production table.
Table of production information (supplied by generated subclass).
Access to production table.
Access to production table.
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.
Push a state number onto the stack.
Read from input to establish our buffer of "parse ahead" lookahead
Symbols.
Top of stack indicator for where we leave off in the real stack.
The actual routine to return one Symbol.
The real stack that we shadow.
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
Direct reference to the reduce-goto table.
Resulting reduce-goto table.
The reduce-goto table (supplied by generated subclass).
Access to reduce_goto
table.
Access to 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.
Report a non fatal error (or warning).
Produce a warning message for one reduce/reduce conflict.
Produce a warning message for one shift/reduce conflict.
Reset the parse ahead input to one Symbol past where we started error
recovery (this consumes one new Symbol from the real input).
Access to the collection of parts for the right hand side.
How much of the right hand side array we are presently using.
RIGHT - static field in class java_cup.
sym
The data passed to parser
RPAREN - static field in class java_cup.simple_calc.
sym SCAN - static field in class java_cup.
sym Get the next Symbol from the input (supplied by generated subclass).
Scan to get the next Symbol.
User code for scan() which is called to get the next Symbol.
Defines the Scanner interface, which CUP uses in the default
implementation of lr_parser.scan()
.
SEMI - static field in class java_cup.
sym SEMI - static field in class java_cup.simple_calc.
sym set the precedence of a terminal
Setting the precedence of a rule
Simple accessor method to set the default scanner.
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.
Determine if we can shift under the special error Symbol out of the
state currently on the top of the (real) parse stack.
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.
STAR - static field in class java_cup.
sym START - static field in class java_cup.
sym special non-terminal for start symbol
The start production of the grammar.
The index of the start production (supplied by generated subclass).
Indicates start production.
Indicates start production.
Start state in the overall state machine.
The index of the start state (supplied by generated subclass).
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?
Handle swallowing up a comment.
CUP generated class containing symbol constants.
sym - class java_cup.simple_calc.
sym CUP generated class containing symbol constants.
The symbol number of the terminal or non terminal being represented
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).
Defines the Symbol class, which is used to represent all terminals
and nonterminals while parsing.
Constructor for no value or l,r
Constructor for l,r values
Constructor for no l,r values
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.
This method is called when a syntax error has been detected and recovery
is about to be invoked.
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.
TIMES - static field in class java_cup.simple_calc.
sym 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.
Return value on the top of the stack (without popping it).
Indication of the index for top of stack (for use by actions).
List of transitions out of this state.
Do a simulated parse forward (a "parse ahead") from the current
stack configuration using stored lookahead input and a virtual parse
stack.
UMINUS - static field in class java_cup.simple_calc.
sym 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.
Utility function: unpacks parse tables from strings
This method is called if it is determined that syntax error recovery
has been unsuccessful.
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.
User code for initialization inside the parser.
User initialization code.