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