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