if (ret == null) throw new RuntimeException("unknown nonterminal \""+nonTerminal+"\"");
return ret;
}
+ public String getFieldName() { return StringUtil.uncapitalize(nonTerminal); }
}
/** a literal string */
public boolean isDropped(Context cx) { return _e.isDropped(cx); }
public Atom toAtom(Context cx) { return _e.toAtom(cx); }
public Element build(Context cx, NonTerminalNode cnt, boolean dropall) { return _e.build(cx, cnt, dropall); }
+ public String getFieldName() { return _e.getFieldName(); }
}
/** a backtick node indicating that, when building the AST, the node's children should be inserted here */
private class LabelNode extends ElementNodeWrapper {
public final String label;
public LabelNode(String label, ElementNode e) { super(e); this.label = label; }
+ public String getFieldName() { return label; }
}
//////////////////////////////////////////////////////////////////////////////