lalr_item |
lalr_item_set.add(lalr_item itm) |
Add a singleton item, merging lookahead sets if the item is already
part of the set.
|
void |
lalr_item_set.add(lalr_item_set other) |
Add a complete set, merging lookaheads where items are already in
the set
|
boolean |
symbol_set.add(symbol sym) |
Add a single symbol to the set.
|
boolean |
symbol_set.add(symbol_set other) |
Add (union) in a complete set.
|
boolean |
terminal_set.add(terminal sym) |
Add a single terminal to the set.
|
boolean |
terminal_set.add(terminal_set other) |
Add (union) in a complete set.
|
void |
non_terminal.add_production(production prod) |
Add a production to our set of productions.
|
void |
lalr_state.add_transition(symbol on_sym,
lalr_state to_st) |
Add a transition out of this state to another.
|
static lalr_state |
lalr_state.build_machine(production start_prod) |
Build an LALR viable prefix recognition machine given a start
production.
|
protected static void |
Main.build_parser() |
Build the (internal) parser from the previously parsed specification.
|
void |
lalr_state.build_table_entries(parse_action_table act_table,
parse_reduce_table reduce_table) |
Fill in the parse table entries for this state.
|
terminal_set |
lalr_item.calc_lookahead(terminal_set lookahead_after) |
Calculate lookahead representing symbols that could appear after the
symbol that the dot is currently in front of.
|
terminal_set |
production.check_first_set() |
Update (and return) the first set based on current NT firsts.
|
boolean |
production.check_nullable() |
Check to see if the production (now) appears to be nullable.
|
void |
parse_action_table.check_reductions() |
Check the table to ensure that all productions have been reduced.
|
void |
lalr_item_set.compute_closure() |
Compute the closure of the set using the LALR closure rules.
|
static void |
non_terminal.compute_first_sets() |
Compute first sets for all non-terminals.
|
static void |
non_terminal.compute_nullability() |
Compute nullability of all non-terminals.
|
boolean |
terminal_set.contains(terminal sym) |
Determine if the set contains a particular terminal.
|
protected static void |
emit.do_action_table(java.io.PrintWriter out,
parse_action_table act_tab,
boolean compact_reduces) |
Emit the action table.
|
static void |
Main.dump_grammar() |
Produce a human readable dump of the grammar.
|
protected static void |
lalr_state.dump_state(lalr_state st) |
Helper routine for debugging -- produces a dump of the given state
onto System.out.
|
protected static void |
emit.emit_action_code(java.io.PrintWriter out,
production start_prod) |
Emit code for the non-public class holding the actual action code.
|
protected static void |
Main.emit_parser() |
Call the emit routines necessary to write out the generated parser.
|
protected static void |
emit.emit_xmlaction_code(java.io.PrintWriter out,
production start_prod) |
Emit code for generic XML parsetree output.
|
protected boolean |
lalr_state.fix_with_precedence(production p,
int term_index,
parse_action_row table_row,
parse_action act) |
Procedure that attempts to fix a shift/reduce error by using
precedences.
|
lalr_item |
lalr_item_set.get_one() |
Remove and return one item from the set (done in hash order).
|
protected parse_action |
lalr_state.insert_action(parse_action a1,
parse_action a2,
int act_type) |
|
protected parse_action |
lalr_state.insert_reduce(parse_action a1,
parse_action a2) |
|
protected parse_action |
lalr_state.insert_shift(parse_action a1,
parse_action a2) |
|
boolean |
terminal_set.intersects(terminal_set other) |
Determine if this set intersects another.
|
boolean |
lalr_item_set.is_subset_of(lalr_item_set other) |
Is this set an (improper) subset of another?
|
boolean |
symbol_set.is_subset_of(symbol_set other) |
Determine if this set is an (improper) subset of another.
|
boolean |
terminal_set.is_subset_of(terminal_set other) |
Determine if this set is an (improper) subset of another.
|
boolean |
lalr_item_set.is_superset_of(lalr_item_set other) |
Is this set an (improper) superset of another?
|
boolean |
symbol_set.is_superset_of(symbol_set other) |
Determine if this set is an (improper) superset of another.
|
boolean |
terminal_set.is_superset_of(terminal_set other) |
Determine if this set is an (improper) superset of another.
|
boolean |
lalr_item.lookahead_visible() |
Determine if everything from the symbol one beyond the dot all the
way to the end of the right hand side is nullable.
|
protected boolean |
non_terminal.looks_nullable() |
Test to see if this non terminal currently looks nullable.
|
static void |
Main.main(java.lang.String[] argv) |
The main driver for the system.
|
protected void |
lalr_item_set.not_null(java.lang.Object obj) |
Helper function for null test.
|
protected void |
symbol_set.not_null(java.lang.Object obj) |
Helper function to test for a null object and throw an exception
if one is found.
|
protected void |
terminal_set.not_null(java.lang.Object obj) |
Helper function to test for a null object and throw an exception if
one is found.
|
static void |
emit.parser(java.io.PrintWriter out,
parse_action_table action_table,
parse_reduce_table reduce_table,
int start_st,
production start_prod,
boolean compact_reduces,
boolean suppress_scanner) |
Emit the parser subclass with embedded tables.
|
protected static void |
lalr_state.propagate_all_lookaheads() |
Propagate lookahead sets through the constructed viable prefix
recognizer.
|
void |
lalr_item.propagate_lookaheads(terminal_set incoming) |
Propagate incoming lookaheads through this item to others need to
be changed.
|
protected void |
lalr_state.propagate_lookaheads() |
Propagate lookahead sets out of this state.
|
void |
lalr_item_set.remove(lalr_item itm) |
Remove a single item if it is in the set.
|
void |
lalr_item_set.remove(lalr_item_set other) |
Remove (set subtract) a complete set.
|
void |
symbol_set.remove(symbol sym) |
Remove a single symbol if it is in the set.
|
void |
symbol_set.remove(symbol_set other) |
Remove (set subtract) a complete set.
|
void |
terminal_set.remove(terminal sym) |
Remove a terminal if it is in the set.
|
protected void |
production.remove_embedded_actions() |
Remove all embedded actions from a production by factoring them
out into individual action production using new non terminals.
|
protected void |
lalr_state.report_conflicts(terminal_set conflict_set) |
Produce warning messages for all conflicts found in this state.
|
protected void |
lalr_state.report_reduce_reduce(lalr_item itm1,
lalr_item itm2) |
Produce a warning message for one reduce/reduce conflict.
|
protected void |
lalr_state.report_shift_reduce(lalr_item red_itm,
int conflict_sym) |
Produce a warning message for one shift/reduce conflict.
|
production_part |
production.rhs(int indx) |
Access to the collection of parts for the right hand side.
|
lalr_item |
lalr_item.shift() |
Produce the new lalr_item that results from shifting the dot one position
to the right.
|
lr_item_core |
lr_item_core.shift_core() |
Produce a new lr_item_core that results from shifting the dot one
position to the right.
|
java.lang.String |
lr_item_core.to_simple_string() |
Convert to a string (separated out from toString() so we can call it
from subclass that overrides toString()).
|
java.lang.String |
production.to_simple_string() |
Convert to a simpler string.
|