checkpoint
[sbp.git] / TODO
1 _____________________________________________________________________________
2 Immediately
3
4   - finalize metagrammar and rdp-op's
5
6   - Lay down the law on the different kinds of Sequence productions
7     and how they work.
8
9      => mydrop
10      => mylift
11
12   - whitespace-in-braces?
13   - Deal with the problem of zero-rep productions and whitespace insertion
14
15   - switch maximal to not-followed-by (~/~)
16
17   - should Union.add() be there?
18   - should Atom.top() be there?
19
20   - fix the location stuff, it's broken
21   - decent/better error messages
22
23   - write some grammars
24       - Java grammar
25       - TeX (math?)
26       - URL (RFC)
27       - RFC2822 (email message/headers)
28       - Wiki grammar
29
30 ______________________________________________________________________________
31 Soon
32
33   - clean up the whole Walk situation
34
35   - cleaner solution to "maximal"?
36
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   - serialization of parse tables
47   - inference of rejections for literals
48   - "prefer whitespace higher up" (?)
49   - "ambiguity modulo dropped fragments"?
50        - can this be checked statically?
51        - eliminated statically?
52
53 ______________________________________________________________________________
54 Later
55
56   - Implement a k-token peek buffer (for each state, see if it "dead
57     ends" during the next k Phases based solely on state -- ignoring
58     result SPPF)
59
60   - Arrange for the SPPF corresponding to dropped subtrees to never be
61     generated (or merged, etc)
62
63   - Is there any way we can avoid creating a GSS.Node instance for
64     nodes which are transient in the sense that they have only one
65     eligible reduction?
66
67   - Implement "GLR syntactic predicates" -- the ability to do
68     arbitrary lookahead (ie "followed-by" and "not-followed-by" for
69     arbitrary patterns).  This enables generalized longest-match and
70     lets us drop the Maximal hack.
71
72   - Re-read Rekers, particularly the stuff on optimal sharing
73
74   - Isolate the Element objects from Parse.Table/GSS so we can move
75     towards compilation.
76
77   - consider allowing a Forest.Body to represent some other Tree whose
78     Body's should be [recursively] considered part of this Forest.
79
80       - perhaps not: right now we have a nice situation where
81         Forest.Ref instances become immutable once iterator()ed.  This
82         also gives us a strong place to to culling with the certainty
83         that we won't throw out a Body which would later be salvaged
84         by some yet-to-be-added dependency.
85
86   - Figure out if there is a way to:
87
88       - allow unwrapping of children other than the very last one.
89
90       - fold repetitions into an array form in Forest, before
91         conversion to Tree.  The major problem here is that multiple
92         tree-arrays are possible, all of different lengths.  Worse,
93         even if they're all the same length, not all elements belong
94         in the same "possibility vector" as all others.  You
95         essentially need a GSS to represent the array, which perhaps
96         is what the unfolded form was in the first place.
97
98   - Wikipedia grammar (needs to be both lexerless and boolean)
99
100   - Boolean Parsing
101       => Ordered Choice (";" operator)
102
103   - bring back in parse-table phase resolution of precedence (just
104     like associativity).  This can be inferred from the use of ">"
105     when the rules are in one of these special forms:
106
107        E ::=  E     _
108            >  _     E
109
110        E ::=  _     E
111            >  E  _  E
112
113        E ::=  E  _  E
114            >  E  _  E
115
116     where "_" is anything and "E" is the defining nonterminal.
117     Essentially what we're looking for is the situation where the
118     leftmost portion of one rule produces another rule, and the
119     rightmost portion of the latter produces the former.
120
121     I'm not 100% certain that this is as "strong" as the prefer/avoid
122     form (try to prove this, you probably can), but it's "what people
123     intend" most of the time.
124
125   - implement Johnstone's algorithm for "reduced, resolved LR
126     tables" to eliminate superfluous reductions on
127     epsilon-transitions.
128
129 ______________________________________________________________________________
130 Neat Ideas
131
132   - Rekers & Koorn note that GLR Substring Parsing can be used to do
133     really elegant and generalized "autocompletion".