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