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