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