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