Commit 1d65e12b authored by Johannes Roith's avatar Johannes Roith

minor changes.

parent 0ea90c3f
......@@ -10,10 +10,15 @@ import de.in.tum.www2.cup.internal.production;
public class LALRResult {
private final CupContext context;
private lalr_state start_state;
private parse_action_table action_table;
private parse_reduce_table reduce_table;
public CupContext getContext() {
return context;
}
public lalr_state getStartState() {
return start_state;
}
......@@ -26,12 +31,13 @@ public class LALRResult {
return reduce_table;
}
private LALRResult() {
private LALRResult(CupContext context) {
this.context = context;
}
public static LALRResult Compute (CupContext context, production start_production) throws internal_error {
LALRResult result = new LALRResult();
LALRResult result = new LALRResult(context);
non_terminal.compute_nullability(context);
non_terminal.compute_first_sets(context);
......
......@@ -29,9 +29,6 @@ public class RefResolutionVisitor extends Visitor<Object>
definitions = new HashMap<String, AbstractNode> ();
forwardDefRefs = new HashMap<String, List<IHasDefinitionReference>> ();
}
// should also resolve:
// 1. declarations
private void resolveDeclarationFrom(String name, IHasDeclarationReference node) {
if (declarations.containsKey(name)) {
......
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