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