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