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