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