checkpoint
[sbp.git] / TODO
1 _____________________________________________________________________________
2 Immediately
3
4 - Migrate Demo.java -> MetaGrammar.java
5     - Figure out serialization
6
7 - Clean up the prioritized-match garbage
8  - evil problems with      (x y? z /ws)
9
10
11   - better ambiguity debugging tools / visualization
12   - ParseFailed, GSS, Walk, Parser, Sequence, Forest
13   - copyright notices
14   - documentation
15
16 ______________________________________________________________________________
17 v1.1
18
19   - finalize metagrammar and rdp-op's
20   - write some grammars
21       - Java grammar
22       - TeX (math?)
23       - URL (RFC)
24       - RFC2822 (email message/headers)
25   - clean up the whole Walk situation (?)
26
27   - what if Tree<> could unwrap itself?
28
29
30 ______________________________________________________________________________
31 Soon
32
33   - serialization of parse tables
34
35   - "ambiguity modulo dropped fragments"?
36        - can this be checked statically?
37        - eliminated statically?
38
39   - substring parsing for better error messages
40   - "lift" cases:
41       - right now I can only lift the last child in a forest...  begs
42         the question of what the right representation for Forests is
43         if we need to be able to do lift operations on it.
44
45   - Parameterized LR
46   - "Regular Right Part" grammars (NP Chapman, etc)
47   - Attribute unification
48
49   - inference of rejections for literals
50   - "prefer whitespace higher up" (?)
51
52   - Labeled edges on trees (associate a label with each slot in the
53     child array in Forest.Body?  might make equality tough) --
54     equivalent to Feature Structures.  Colon-labeling.
55
56 ______________________________________________________________________________
57 Later
58
59   - Partly-Linear-PATR? (O(n^6) unification grammar)
60
61   - Implement a k-token peek buffer (for each state, see if it "dead
62     ends" during the next k Phases based solely on state -- ignoring
63     result SPPF)
64
65   - Arrange for the SPPF corresponding to dropped subtrees to never be
66     generated (or merged, etc)
67
68   - Is there any way we can avoid creating a GSS.Node instance for
69     nodes which are transient in the sense that they have only one
70     eligible reduction?
71
72   - Re-read Rekers, particularly the stuff on optimal sharing
73
74   - Isolate the Element objects from Parse.Table/GSS so we can move
75     towards compilation.
76
77   - consider allowing a Forest.Body to represent some other Tree whose
78     Body's should be [recursively] considered part of this Forest.
79
80       - perhaps not: right now we have a nice situation where
81         Forest.Ref instances become immutable once iterator()ed.  This
82         also gives us a strong place to to culling with the certainty
83         that we won't throw out a Body which would later be salvaged
84         by some yet-to-be-added dependency.
85
86   - Figure out if there is a way to:
87
88       - allow unwrapping of children other than the very last one.
89
90       - fold repetitions into an array form in Forest, before
91         conversion to Tree.  The major problem here is that multiple
92         tree-arrays are possible, all of different lengths.  Worse,
93         even if they're all the same length, not all elements belong
94         in the same "possibility vector" as all others.  You
95         essentially need a GSS to represent the array, which perhaps
96         is what the unfolded form was in the first place.
97
98   - Wikipedia grammar (needs to be both lexerless and boolean)
99
100   - Boolean Parsing
101       => Ordered Choice (";" operator)
102
103   - bring back in parse-table phase resolution of precedence (just
104     like associativity).  This can be inferred from the use of ">"
105     when the rules are in one of these special forms:
106
107        E ::=  E     _
108            >  _     E
109
110        E ::=  _     E
111            >  E  _  E
112
113        E ::=  E  _  E
114            >  E  _  E
115
116     where "_" is anything and "E" is the defining nonterminal.
117     Essentially what we're looking for is the situation where the
118     leftmost portion of one rule produces another rule, and the
119     rightmost portion of the latter produces the former.
120
121     I'm not 100% certain that this is as "strong" as the prefer/avoid
122     form (try to prove this, you probably can), but it's "what people
123     intend" most of the time.
124
125   - implement Johnstone's algorithm for "reduced, resolved LR
126     tables" to eliminate superfluous reductions on
127     epsilon-transitions.
128
129 ______________________________________________________________________________
130 Neat Ideas
131
132   - Rekers & Koorn note that GLR Substring Parsing can be used to do
133     really elegant and generalized "autocompletion".
134
135
136 ______________________________________________________________________________
137 Ideas for the Future
138
139 - Incremental parse table construction
140 - "lazy GLR" and "lazy trees" -> language with first-class CF matching
141     - perhaps linear boolean grammars instead? (linear time, quad space)
142 - Forest parsing => chained parsers
143 - unification parsing, attributes, etc
144 - RRP grammars?
145 - Take another stab at maximal-match?  Nonterminal not-followed-by is
146   too strong.
147 - Error recovery based on substring parsing