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