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