-// priorities are all messy and dont get serialized
-// 1. Error messages
-// 2. Java MetaGrammar (proof of concept)
-// 3. Ivan's MetaGrammar
-// 4. Documentation format
-// - TIB
-
-// TODO: better API for interfacing with Java
-// TODO: error messages
-// TODO: integrate with TIB
-
-// Element
-// Walk
-// ParseTable / GSS
-// MetaGrammar (necessary/relevant?)
-// Tree<String> (cleanup?)
-// Union.SubUnion
-// Repeat
-
-// FEATURE: serialization of ParseTable's, generation of Java code
-// FEATURE: infer reject elements for literals
-// FEATURE: prefer whitespace higher up
-// FEATURE: full conjunctive and boolean grammars
-// FEATURE: "ambiguity modulo dropped fragments"? can this be checked for statically? eliminated statically?
-// - drop stuff during the parsing process (drop nodes)
-
-// LATER: Element<A> -- parameterize over the input token type? Makes a huge mess...
-// LATER: Go back to where Sequence is not an Element?
-// - The original motivation for making Sequence "first class" was the fact that
-// in order to do associativity right you need to have per-Sequence follow sets
-
______________________________________________________________________________
Immediately
- "Regular Right Part" grammars (NP Chapman, etc)
- Attribute unification
+ - serialization of parse tables
+ - inference of rejections for literals
+ - "prefer whitespace higher up" (?)
+ - "ambiguity modulo dropped fragments"?
+ - can this be checked statically?
+ - eliminated statically?
+
______________________________________________________________________________
Later
public MetaGrammar grammar(Object o, Union[] u, Object x) { return this; }
public char _backslash_n() { return '\n'; }
public char _backslash_r() { return '\r'; }
- public String literal(String s) { return s; }
- /*
- public Element literal(String s) {
+ //public String literal(String s) { return s; }
+
+ public Object literal(String s) {
Element e = CharToken.string(s);
- dropAll.add(e);
- return e;
+ return new MyDrop(e);
+ //dropAll.add(e);
+ //return e;
}
- */
+
public Range range0(char a) { return new Range(a, a); }
public Range range0(char a, char b) { return new Range(a, b); }
public Range range1(char a, char b) { return new Range(a, b); }
+
// DO NOT EDIT STUFF BELOW: IT IS AUTOMATICALLY GENERATED
new Tree(null, "gram", new Tree[] { new Tree(null, null, new Tree[] { }),
new Tree(null, "grammar", new Tree[] { new Tree(null, null, new Tree[] { new Tree(null, "::=", new Tree[] { new Tree(null, "sify", new Tree[] { new Tree(null, null, new Tree[] { new Tree(null, "s", new Tree[] { })})}),
+