-
Notifications
You must be signed in to change notification settings - Fork 0
/
TODO
128 lines (88 loc) · 3.84 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
--------------------------------------------------------------------------------
TODO NOW
- index allocation should be per-grammar
- extensions should be registered before root pe
- extension pe should be created by extension
==> done: ExpressionCluster, other (in ext + out ext) to go
- allow options in grammar files, namely for root and whitespace spec
(to be retrieved from GrammarCompiler)
- rework cluster filtering mechanism
- simple fix: insert a checking parsing expression around named arrows
- OR warn and implement next item instead
- better support for layering with smart tree-building that automatically rewrites trees
(see notes, p. D5)
TODO GRADUAL
- user manual
TODO GUMPTION
- insert $ in Java8 grammar (rule-level only) (-> 544)
- reorganize imports
TODO FURTHER SMALL
- well formedness check (ford: WF -- can't loop without consuming)
- scoped memoization
- MemoScope
- ScopedMemo
- compact parsing expression printing (not multiline)
- generators for state/input/etc boilerplate
- separate accessors and groups better or make an understandble parse tree build error
- grammar compositions
- SubGrammar: verify and document
- move precedence into its own extension
- switch default nullability settings to yes
- custom error messages
- introduce fatal errors during parsing
- clarify behaviour of grammatical transformations wrt expression names
- either rule substitution: the old rule becomes a new one, the name is **moved**
- or wrapping: the name is unchanged
- clever way to export the inputs
- use the parsestate class instead of extension?
- increase depth when profiling
http://stackoverflow.com/questions/18245217
TODO WONDER
- parsec choice combinator doesn't backtrack unless your use try
- is explicit backtracking control a good idea? (use <|>)
- related to cut (although simpler implem)
- look at parsec etc for error handling
- probably should have a Error(msg) parsing expression that fails with a message
- interplay with cutting/limited backtracking? to commit to certain alternatives
TODO FURTHER BIG
- tokenizers
- token PE linked to a tokenizer + type
- memoization window around position
- error handling: an error over a token can become "unexpected X"
- advantage: handles reserved identifiers
- tokenizer X =
- how to set the current tokenizer?
`tokenizer(X)`
- how to call a token?
% token_name
- TokenRef class
- how to mark an alternative as a token
%= token_name
`def_token(X)`
- how to extend syntax with custom functions
`function(x)[<string>](<expr>)`
pexp X = <java method ref>
- no capture operator
`nocapture(X)`
- whitespace operator
`whitespace`
- dumb operator
`fast(X)`
- remove ^= and %= operators
- mini type system for captures? automatic AST classes generation?
- think about building in validation rules
- grammar composition
- we already have subgrammars
- otherwise, union extensions; and glue grammars: requires path descriptors
- grammar parameterization
TODO MUCH LATER
- make dumb expression faster via a backtracking DPDA
- think about how a parser could be retooled to parse html
(which is lax in syntax) -> need to define bounding boxes
- semi-parsing
- start with per-block error recovery
- performance metrics to guide optimization
+ automatic memoization JIT'ing?
- value stack?
- delayed semantic actions?
--------------------------------------------------------------------------------