checkpoint
[sbp.git] / TODO
1 _____________________________________________________________________________
2 Immediately
3
4   - evil problems with      (x y? z /ws)
5   - ParseFailed, GSS, Walk, Parser, Sequence, Forest
6   - copyright notices
7   - documentation
8
9   - grammar highlighting?
10   - comment indentation vs block indentation?
11   - { and } in <pre>
12   - recursive { { foo } }
13
14 ______________________________________________________________________________
15 v1.1
16
17   - finalize metagrammar and rdp-op's
18   - write some grammars
19       - Java grammar
20       - TeX (math?)
21       - URL (RFC)
22       - RFC2822 (email message/headers)
23   - clean up the whole Walk situation (?)
24
25
26 ______________________________________________________________________________
27 Soon
28
29   - serialization of parse tables
30
31   - "ambiguity modulo dropped fragments"?
32        - can this be checked statically?
33        - eliminated statically?
34
35   - substring parsing for better error messages
36
37   - Parameterized LR
38   - "Regular Right Part" grammars (NP Chapman, etc)
39   - Attribute unification
40
41   - inference of rejections for literals
42   - "prefer whitespace higher up" (?)
43
44   - Labeled edges on trees (associate a label with each slot in the
45     child array in Forest.Body?  might make equality tough) --
46     equivalent to Feature Structures.  Colon-labeling.
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