better reporting of indentation related parse errors
[sbp.git] / TODO
diff --git a/TODO b/TODO
index 1185209..daf3667 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,71 +1,95 @@
-// 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
+  - use 'a'-'z' or 'a-z' instead of [a-z]?
+  - EOF token?
+  - de-genericize?
+  - better toString() methods all around...
+  - foo.add(x)
+    foo.add(y.andnot(x)) ==> this is broken
+      - distinguish Conjunct from Sequence?
+            => !(Conjunct instanceof Reducible)
+  - document the assumption that Sequences that match epsilon
+    must have tag, and that ONLY that tag is returned
+    when the sequence matches epsilon
+  - try to avoid building the parts of the tree that end up getting
+    dropped
+  - double-check all the region logic
+
+  ..................................................
+
+  - paper/techreport opportunities
+      - interaction between RNGLR and follow restrictions
+      - "doomed node" optimization
+
+  - automatically collect time statistics and display
+  - serializable parse tables?
+  - better ambiguity reporting
+      - colorized tree-diffs?
+      - graphviz?
 
-  - switch maximal to not-followed-by (~/~)
-
-  - should Union.add() be there?
-  - should Atom.top() be there?
+______________________________________________________________________________
+v1.1
+
+  - Treewalker code compiler?
+  - circular gramars?
+      s = A
+      A = A | "b"
+  - skeleton generator?
+  - precedes restrictions ("<-")
+  - MUST HAVE BETTER ERROR MESSAGES
+     - use for developing java15.g
+  - java15.g
+     - once this is ready, do big announcement
+  - broader regression testing (for stuff like error messages, etc)
+  - More topology untangling [later]
+  - grammar highlighting?
+  - Forest needs a "manual access" API
+      - the unwrap bit in Forest makes it really hard
+        to expose an API for forests
+  - rewriting language? multiple passes?
 
-  - fix the location stuff, it's broken
-  - decent/better error messages
+______________________________________________________________________________
+v1.2
 
+  - finalize metagrammar and rdp-op's
   - write some grammars
       - Java grammar
       - TeX (math?)
       - URL (RFC)
       - RFC2822 (email message/headers)
-      - Wiki grammar
+  - clean up the whole Walk situation (?)
+
 
 ______________________________________________________________________________
 Soon
 
-  - clean up the whole Walk situation
+  - serialization of parse tables
 
-  - cleaner solution to "maximal"?
+  - "ambiguity modulo dropped fragments"?
+       - can this be checked statically?
+       - eliminated statically?
 
-  - "lift" cases:
-      - right now I can only lift the last child in a forest...  begs
-        the question of what the right representation for Forests is
-        if we need to be able to do lift operations on it.
+  - substring parsing for better error messages
 
   - Parameterized LR
   - "Regular Right Part" grammars (NP Chapman, etc)
   - Attribute unification
 
+  - inference of rejections for literals
+  - "prefer whitespace higher up" (?)
+
+  - Labeled edges on trees (associate a label with each slot in the
+    child array in Forest.Body?  might make equality tough) --
+    equivalent to Feature Structures.  Colon-labeling.
+
 ______________________________________________________________________________
 Later
 
+  - understand and implement the RNGLR "kernel state" optimization.
+    The _Practical Early Parsing_ paper may help.
+
+  - Partly-Linear-PATR? (O(n^6) unification grammar)
+
   - Implement a k-token peek buffer (for each state, see if it "dead
     ends" during the next k Phases based solely on state -- ignoring
     result SPPF)
@@ -77,11 +101,6 @@ Later
     nodes which are transient in the sense that they have only one
     eligible reduction?
 
-  - Implement "GLR syntactic predicates" -- the ability to do
-    arbitrary lookahead (ie "followed-by" and "not-followed-by" for
-    arbitrary patterns).  This enables generalized longest-match and
-    lets us drop the Maximal hack.
-
   - Re-read Rekers, particularly the stuff on optimal sharing
 
   - Isolate the Element objects from Parse.Table/GSS so we can move
@@ -138,3 +157,23 @@ Later
   - implement Johnstone's algorithm for "reduced, resolved LR
     tables" to eliminate superfluous reductions on
     epsilon-transitions.
+
+______________________________________________________________________________
+Neat Ideas
+
+  - Rekers & Koorn note that GLR Substring Parsing can be used to do
+    really elegant and generalized "autocompletion".
+
+
+______________________________________________________________________________
+Ideas for the Future
+
+- Incremental parse table construction
+- "lazy GLR" and "lazy trees" -> language with first-class CF matching
+    - perhaps linear boolean grammars instead? (linear time, quad space)
+- Forest parsing => chained parsers
+- unification parsing, attributes, etc
+- RRP grammars?
+- Take another stab at maximal-match?  Nonterminal not-followed-by is
+  too strong.
+- Error recovery based on substring parsing