Commit 6fa2b8b7 authored by Johannes Roith's avatar Johannes Roith

remove some crap.

parent 26db32f8
......@@ -12,7 +12,6 @@ import de.in.tum.www2.cup.internal.emit;
class Demo
{
public static void main(String[] blah) throws Exception {
IErrorReporter er = new DefaultErrorReporter();
......@@ -28,26 +27,13 @@ class Demo
LocationPatchVisitor visitor = new LocationPatchVisitor();
res.accept(visitor, null);
System.out.println("computing ...");
// FIX static:
// - terminal_set (EMPTY -> OK)
// - lalr_state (all, all_kernels, next_index)
// - parse_action_row (_size, reduction_count)
// - parse_reduce_row (_size)
// - terminal
// - non_terminal
// - production (_all, next_index)
// - emit
System.out.println("Computing tables ...");
LALRResult lalrResult = LALRResult.Compute(context, context.start_production);
System.out.println(lalrResult.action_table);
System.out.println(lalrResult.reduce_table);
/*
lalr_state ordered[] = new lalr_state[lalr_state.number()];
/*lalr_state ordered[] = new lalr_state[lalr_state.number()];
for (Enumeration s = lalr_state.all(); s.hasMoreElements(); )
{
lalr_state st = (lalr_state)s.nextElement();
......@@ -61,24 +47,9 @@ class Demo
System.err.println(ordered[i]);
System.err.println("-------------------");
}
}*/
/*
System.out.println("parser code: " + emit.parser_code);
System.out.println("init code: " + emit.init_code);
System.out.println("scan code: " + emit.scan_code);
}
*/
// terminal
// non terminal
// precedence left
production prod = emit.start_production;
System.out.println(prod);
*/
System.out.println("done.");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment