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