// MetaGrammar //////////////////////////////////////////////////////////////////////////////
public Object _star_(Element r) { return new Rep(r, null, false, true); }
- public Union _colon__colon__equals_(String s, PreSequence[][] p) { return nonTerminalZ(s, p); }
- public Union _bang__colon__colon__equals_(String s, PreSequence[][] p) { return nonTerminalZ(s, p, true); }
- public Union _colon__colon__equals_(boolean q, String s, PreSequence[][] p) { return nonTerminalZ(s, p, q); }
public Element epsilon(Object o, Object b) { return epsilon; }
public Element _rightparen_(Object e) { return SELF; }
public Object _caret_(String s) { return new MyLift(s); }
public Object _leftparen__rightparen_() { return epsilon; }
- public Object _leftparen_(PreSequence[][] p) { return nonTerminalZ(p); }
- public PreSequence[] alternatives(PreSequence[] s) { return s; }
- public Union nonTerminal(String s) { return nonTerminalX(s, false, false); }
- public Union nonTerminalY(String s) { return nonTerminalX(s, false, false); }
- public Union nonTerminalX(String s, boolean synthetic, boolean dropAll) {
+ public Union nonTerminal(String s) { return nonTerminal(s, false, false); }
+ public Union nonTerminal(String s, boolean synthetic, boolean dropAll) {
Union n = s.equals(startSymbol) ? g : nt.get(s);
if (n == null) nt.put(s, n = new Union(s, synthetic));
if (dropAll) this.dropAll.add(n);
return n;
}
- public Union nonTerminalZ(PreSequence[][] p) { return nonTerminalX("anon"+(anon++), p, false, false); }
- public Union nonTerminalZ(String s, PreSequence[][] p) { return nonTerminalX(s, p, false, false); }
- public Union nonTerminalZ(String s, PreSequence[][] p, boolean q) { return nonTerminalX(s, p, false, q); }
- public Object _backslash__leftbrace_(String s) { return SELF; }
- public Object _leftbrace_(String s) { return SELF; }
- public Object _plus_(final Element r) { return new Rep(r, null, false, false); }
+ public Union _colon__colon__equals_(String s, PreSequence[][] p) { return nonTerminal(s, p, false, false); }
+ public Union _bang__colon__colon__equals_(String s, PreSequence[][] p) { return nonTerminal(s, p, false, true); }
+ public Union _colon__colon__equals_(boolean q, String s, PreSequence[][] p) { return nonTerminal(s, p, false, q); }
+ public Object _leftparen_(PreSequence[][] p) { return nonTerminal("anon"+(anon++), p, false, false); }
+ public Object _backslash__leftbrace_(String s) { return SELF; }
+ public Object _leftbrace_(String s) { return SELF; }
+ public Object _plus_(final Element r) { return new Rep(r, null, false, false); }
public Object[] _slash_(Object[] o, Object sep) {
if (o.length <= 1) return o;
Object[] ret = new Object[o.length * 2 - 1];
return ret;
}
- public Union nonTerminalX(String str, PreSequence[][] s, boolean synthetic, boolean dropAll) {
- Union n = nonTerminalX(str, synthetic, dropAll);
+ public Union nonTerminal(String str, PreSequence[][] s, boolean synthetic, boolean dropAll) {
+ Union n = nonTerminal(str, synthetic, dropAll);
if (s == null || s.length==0) { n.add(Sequence.empty); return n; }
HashSet<Sequence> seqs = new HashSet<Sequence>();
for(int i=0; i<s.length; i++) {