47593cbd5e0a464a5c95beaf330231aa75b1e2b0
[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
48 ______________________________________________________________________________
49 Later
50
51   - Partly-Linear-PATR? (O(n^6) unification grammar)
52
53   - Implement a k-token peek buffer (for each state, see if it "dead
54     ends" during the next k Phases based solely on state -- ignoring
55     result SPPF)
56
57   - Arrange for the SPPF corresponding to dropped subtrees to never be
58     generated (or merged, etc)
59
60   - Is there any way we can avoid creating a GSS.Node instance for
61     nodes which are transient in the sense that they have only one
62     eligible reduction?
63
64   - Re-read Rekers, particularly the stuff on optimal sharing
65
66   - Isolate the Element objects from Parse.Table/GSS so we can move
67     towards compilation.
68
69   - consider allowing a Forest.Body to represent some other Tree whose
70     Body's should be [recursively] considered part of this Forest.
71
72       - perhaps not: right now we have a nice situation where
73         Forest.Ref instances become immutable once iterator()ed.  This
74         also gives us a strong place to to culling with the certainty
75         that we won't throw out a Body which would later be salvaged
76         by some yet-to-be-added dependency.
77
78   - Figure out if there is a way to:
79
80       - allow unwrapping of children other than the very last one.
81
82       - fold repetitions into an array form in Forest, before
83         conversion to Tree.  The major problem here is that multiple
84         tree-arrays are possible, all of different lengths.  Worse,
85         even if they're all the same length, not all elements belong
86         in the same "possibility vector" as all others.  You
87         essentially need a GSS to represent the array, which perhaps
88         is what the unfolded form was in the first place.
89
90   - Wikipedia grammar (needs to be both lexerless and boolean)
91
92   - Boolean Parsing
93       => Ordered Choice (";" operator)
94
95   - bring back in parse-table phase resolution of precedence (just
96     like associativity).  This can be inferred from the use of ">"
97     when the rules are in one of these special forms:
98
99        E ::=  E     _
100            >  _     E
101
102        E ::=  _     E
103            >  E  _  E
104
105        E ::=  E  _  E
106            >  E  _  E
107
108     where "_" is anything and "E" is the defining nonterminal.
109     Essentially what we're looking for is the situation where the
110     leftmost portion of one rule produces another rule, and the
111     rightmost portion of the latter produces the former.
112
113     I'm not 100% certain that this is as "strong" as the prefer/avoid
114     form (try to prove this, you probably can), but it's "what people
115     intend" most of the time.
116
117   - implement Johnstone's algorithm for "reduced, resolved LR
118     tables" to eliminate superfluous reductions on
119     epsilon-transitions.
120
121 ______________________________________________________________________________
122 Neat Ideas
123
124   - Rekers & Koorn note that GLR Substring Parsing can be used to do
125     really elegant and generalized "autocompletion".
126
127
128 ______________________________________________________________________________
129 Ideas for the Future
130
131 - Incremental parse table construction
132 - "lazy GLR" and "lazy trees" -> language with first-class CF matching
133     - perhaps linear boolean grammars instead? (linear time, quad space)
134 - Forest parsing => chained parsers
135 - unification parsing, attributes, etc
136 - RRP grammars?
137 - Take another stab at maximal-match?  Nonterminal not-followed-by is
138   too strong.
139 - Error recovery based on substring parsing