checkpoint
[sbp.git] / TODO
1 _____________________________________________________________________________
2 Immediately
3
4   - Lay down the law on the different kinds of Sequence productions
5     and how they work.
6
7   - switch maximal to not-followed-by (~/~)
8
9   - should Union.add() be there?
10   - should Atom.top() be there?
11
12   - fix the location stuff, it's broken
13   - decent/better error messages
14
15   - write some grammars
16       - Java grammar
17       - TeX (math?)
18       - URL (RFC)
19       - RFC2822 (email message/headers)
20       - Wiki grammar
21
22 ______________________________________________________________________________
23 Soon
24
25   - clean up the whole Walk situation
26
27   - cleaner solution to "maximal"?
28
29   - "lift" cases:
30       - right now I can only lift the last child in a forest...  begs
31         the question of what the right representation for Forests is
32         if we need to be able to do lift operations on it.
33
34   - Parameterized LR
35   - "Regular Right Part" grammars (NP Chapman, etc)
36   - Attribute unification
37
38   - serialization of parse tables
39   - inference of rejections for literals
40   - "prefer whitespace higher up" (?)
41   - "ambiguity modulo dropped fragments"?
42        - can this be checked statically?
43        - eliminated statically?
44
45 ______________________________________________________________________________
46 Later
47
48   - Implement a k-token peek buffer (for each state, see if it "dead
49     ends" during the next k Phases based solely on state -- ignoring
50     result SPPF)
51
52   - Arrange for the SPPF corresponding to dropped subtrees to never be
53     generated (or merged, etc)
54
55   - Is there any way we can avoid creating a GSS.Node instance for
56     nodes which are transient in the sense that they have only one
57     eligible reduction?
58
59   - Implement "GLR syntactic predicates" -- the ability to do
60     arbitrary lookahead (ie "followed-by" and "not-followed-by" for
61     arbitrary patterns).  This enables generalized longest-match and
62     lets us drop the Maximal hack.
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.