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