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