more accurate positions in CharInput
[sbp.git] / TODO
1 _____________________________________________________________________________
2 Immediately
3   - use 'a'-'z' or 'a-z' instead of [a-z]?
4   - EOF token?
5   - de-genericize?
6   - better toString() methods all around...
7   - foo.add(x)
8     foo.add(y.andnot(x)) ==> this is broken
9       - distinguish Conjunct from Sequence?
10             => !(Conjunct instanceof Reducible)
11   - document the assumption that Sequences that match epsilon
12     must have tag, and that ONLY that tag is returned
13     when the sequence matches epsilon
14   - try to avoid building the parts of the tree that end up getting
15     dropped
16   - double-check all the region logic
17
18   ..................................................
19
20   - paper/techreport opportunities
21       - interaction between RNGLR and follow restrictions
22       - "doomed node" optimization
23
24   - automatically collect time statistics and display
25   - serializable parse tables?
26   - better ambiguity reporting
27       - colorized tree-diffs?
28       - graphviz?
29
30 ______________________________________________________________________________
31 v1.1
32
33   - Treewalker code compiler?
34   - circular gramars?
35       s = A
36       A = A | "b"
37   - skeleton generator?
38   - precedes restrictions ("<-")
39   - MUST HAVE BETTER ERROR MESSAGES
40      - use for developing java15.g
41   - java15.g
42      - once this is ready, do big announcement
43   - broader regression testing (for stuff like error messages, etc)
44   - More topology untangling [later]
45   - grammar highlighting?
46   - Forest needs a "manual access" API
47       - the unwrap bit in Forest makes it really hard
48         to expose an API for forests
49   - rewriting language? multiple passes?
50
51 ______________________________________________________________________________
52 v1.2
53
54   - finalize metagrammar and rdp-op's
55   - write some grammars
56       - Java grammar
57       - TeX (math?)
58       - URL (RFC)
59       - RFC2822 (email message/headers)
60   - clean up the whole Walk situation (?)
61
62
63 ______________________________________________________________________________
64 Soon
65
66   - serialization of parse tables
67
68   - "ambiguity modulo dropped fragments"?
69        - can this be checked statically?
70        - eliminated statically?
71
72   - substring parsing for better error messages
73
74   - Parameterized LR
75   - "Regular Right Part" grammars (NP Chapman, etc)
76   - Attribute unification
77
78   - inference of rejections for literals
79   - "prefer whitespace higher up" (?)
80
81   - Labeled edges on trees (associate a label with each slot in the
82     child array in Forest.Body?  might make equality tough) --
83     equivalent to Feature Structures.  Colon-labeling.
84
85 ______________________________________________________________________________
86 Later
87
88   - understand and implement the RNGLR "kernel state" optimization.
89     The _Practical Early Parsing_ paper may help.
90
91   - Partly-Linear-PATR? (O(n^6) unification grammar)
92
93   - Implement a k-token peek buffer (for each state, see if it "dead
94     ends" during the next k Phases based solely on state -- ignoring
95     result SPPF)
96
97   - Arrange for the SPPF corresponding to dropped subtrees to never be
98     generated (or merged, etc)
99
100   - Is there any way we can avoid creating a GSS.Node instance for
101     nodes which are transient in the sense that they have only one
102     eligible reduction?
103
104   - Re-read Rekers, particularly the stuff on optimal sharing
105
106   - Isolate the Element objects from Parse.Table/GSS so we can move
107     towards compilation.
108
109   - consider allowing a Forest.Body to represent some other Tree whose
110     Body's should be [recursively] considered part of this Forest.
111
112       - perhaps not: right now we have a nice situation where
113         Forest.Ref instances become immutable once iterator()ed.  This
114         also gives us a strong place to to culling with the certainty
115         that we won't throw out a Body which would later be salvaged
116         by some yet-to-be-added dependency.
117
118   - Figure out if there is a way to:
119
120       - allow unwrapping of children other than the very last one.
121
122       - fold repetitions into an array form in Forest, before
123         conversion to Tree.  The major problem here is that multiple
124         tree-arrays are possible, all of different lengths.  Worse,
125         even if they're all the same length, not all elements belong
126         in the same "possibility vector" as all others.  You
127         essentially need a GSS to represent the array, which perhaps
128         is what the unfolded form was in the first place.
129
130   - Wikipedia grammar (needs to be both lexerless and boolean)
131
132   - Boolean Parsing
133       => Ordered Choice (";" operator)
134
135   - bring back in parse-table phase resolution of precedence (just
136     like associativity).  This can be inferred from the use of ">"
137     when the rules are in one of these special forms:
138
139        E ::=  E     _
140            >  _     E
141
142        E ::=  _     E
143            >  E  _  E
144
145        E ::=  E  _  E
146            >  E  _  E
147
148     where "_" is anything and "E" is the defining nonterminal.
149     Essentially what we're looking for is the situation where the
150     leftmost portion of one rule produces another rule, and the
151     rightmost portion of the latter produces the former.
152
153     I'm not 100% certain that this is as "strong" as the prefer/avoid
154     form (try to prove this, you probably can), but it's "what people
155     intend" most of the time.
156
157   - implement Johnstone's algorithm for "reduced, resolved LR
158     tables" to eliminate superfluous reductions on
159     epsilon-transitions.
160
161 ______________________________________________________________________________
162 Neat Ideas
163
164   - Rekers & Koorn note that GLR Substring Parsing can be used to do
165     really elegant and generalized "autocompletion".
166
167
168 ______________________________________________________________________________
169 Ideas for the Future
170
171 - Incremental parse table construction
172 - "lazy GLR" and "lazy trees" -> language with first-class CF matching
173     - perhaps linear boolean grammars instead? (linear time, quad space)
174 - Forest parsing => chained parsers
175 - unification parsing, attributes, etc
176 - RRP grammars?
177 - Take another stab at maximal-match?  Nonterminal not-followed-by is
178   too strong.
179 - Error recovery based on substring parsing