// Epsilon Form //////////////////////////////////////////////////////////////////////////////
// FIXME
- public static Union epsilon = new Union("()");
- static { epsilon.add(Sequence.empty); }
-
- // FIXME
private Forest.Many epsilonForm = null;
Forest epsilonForm() {
if (epsilonForm != null) return epsilonForm;
/** returns an element which exactly matches the string given */
public static Element string(String s) { return string(s, true); }
public static Element string(String s, boolean share) {
- if (share && s.length() == 0) return Union.epsilon;
+ if (share && s.length() == 0) return epsilon;
final String escapified = "\""+StringUtil.escapify(s, "\"\r\n\\")+"\"";
Element ret;
if (share && s.length() == 1) {
return ret;
}
+ private static Union epsilon = new Union("()");
+ static { epsilon.add(Sequence.empty); }
}
public static @bind.as Seq psx(Seq s) { return s; }
public static @bind.as(":") ElementNode colon(String s, ElementNode e) { return new Label(s, e); }
public static @bind.as(")") void close(String foo) { throw new Error("not supported"); }
- public static @bind.as("()") ElementNode epsilon() { return new Constant(Union.epsilon); }
+ public static @bind.as("()") ElementNode epsilon() { return new Constant(epsilon); }
+
+ private static Union epsilon = new Union("()");
+ static { epsilon.add(Sequence.empty); }
public static class NonTerminalReferenceNode extends ElementNode {
public String nonTerminal;