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