git @ Cat's Eye Technologies Tamsin / add7fea
Hit the TODO list with a blunt instrument a couple of times. Chris Pressey 10 years ago
1 changed file(s) with 20 addition(s) and 27 deletion(s). Raw diff Collapse all Expand all
22
33 ### higher-priority ###
44
5 * apropos to that, using an ad-hoc syntax, is:
6 * `production @ %stdin` is the default; it is implied when no `@`
7 * `production @ %mmap` to use the mmap scanner
8 * `production @ %line` to use an interactive terminal line editor-ish
9 scanner or something.
5 * allow switching the kind of buffer that is used when `@` is used:
6 * `rule @ %stdin` is the default; it is implied when no `@`
7 * `rule @ %mmap` to use an MmapBuffer
8 * `rule @ %line` to use a LineEditorBuffer
9 * `rule @ $:open('file.txt')` ?
1010 * `$:add`, `$:sub`, `$:mul`, `$:div`, `$:rem`, for atoms which look like
11 integers: `["-"] & {$:digit}`. or for an actual integer type.
11 integers: `["-"] & {$:digit}`.
1212 * `$:tell` and `$:seek` the implicit buffer — for VM's etc — although
1313 note, this may have scary consequences when combined with backtracking
1414 * pattern match in send: (can't go in set b/c it looks like a nonterminal)
1515 * `fields → fields(H,T) & H`
16
17 ### medium-priority ###
18
19 * Starting with knowns about `$` builtins, an analysis to determine, for Rule:
20 - may consume input, never consumes input
21 - may fail, always fails
22 - may succeed, always succeeds... (may_backtrack?)
23 * production values
24 * `$:fold(^production, nil, cons)`
25 * `$:fold(^($:alnum & " "), '', ^L+','+R)`
1626 * codegen and emitter phases in compiler. take current compiler phase,
1727 make it construct a low-level representation instead (codegen), then
1828 have a phase that writes out C code from that low-level repr (emitter)
29 * non-backtracking versions of `|` and `{}`: `|!` and `{}!`
1930
2031 ### testing ###
2132
2940
3041 ### lower-priority ###
3142
32 * `(foo → S | ok)` & print S ... should set S to error if foo failed?
33 * or `(foo |→ S ok)` ?
3443 * `ctype` module, with `alpha` and `digit` and etc.
3544 * `list` module: `deep_reverse`
3645 * use Tamsin repr in error messages
3746 * __str__ should be Tamsin repr()?
38 * `format`, using `@` — in Tamsin (don't we have this?)
39 * `\s` production for whitespace
40 * `\f` escape for form feed (why??)
41 * non-backtracking versions of `|` and `{}`: `|!` and `{}!`
47 * regex-like shortcuts: `\w` for "word", `\s` for "whitespace", etc.
4248 * have compiler replace calls to `list` functions
4349 by "more efficient" versions written in C -- if they really are...
4450 * and maybe even garbage-collect terms in libtamsin
4551 * figure out why reading a 4M file in a compiled program TAKES DOWN UBUNTU
4652 * make it possible to recover from more errors using `|` (don't throw
4753 exceptions so often)
48 * fold: often you want to construct terms "the other way" or to "join"
49 a string with delimiters; can we handle those cases too?
50 * actual production values would be really nice; then we could
51 `$:fold(production, nil, cons)`
52 or even
53 `$:fold(^($:alnum & " "), '', ^L+','+R)`
5454 * stronger tests for scanner, parser: dump all falderal testbodies to files
5555 * option for ref interp to not output result (or by default, don't)
5656 * "mini" interpreter that handles variables (ouch)
57 * SOME WAY TO DISTINGUISH PRODUCTIONS WHICH MAY CONSUME INPUT AND
58 PRODUCTIONS WHICH NEVER CONSUME INPUT (in the `$` module, and generally).
59 * actual numeric values, rather than atoms-which-contain-only-digits
6057 * error handling: skip to next sentinel and report more errors
6158 * module-level updatable variables. or globals. or "process dictionary"
6259 `$:store()` and `$:fetch()`. or database.
6764 * `walk(T@tree(L,R)) = ...`
6865 * maps, implemented as hash tables.
6966 * `Table ← {} & fields → F@fields(H,T) & Table[H] ← T`
70 * on that topic — production values and/or lambda productions...
7167 * pretty-print AST for error messages
7268
7369 ### symbol fun ###
9591 * term-rewriting library; a la Treacle; should make desugarer almost trivial
9692 * algebraically cool version of `|`, perhaps as a worked example
9793 (implement Bakerloo in Tamsin)
98 * analysis: always_succeeds(Rule)
99 * analysis: may_backtrack(Rule)
100 * analysis: may_consume_input(Rule)
101 * regex-like shortcuts: `\w` for "word", `\s` for "whitespace", etc.
10294 * EOF and nil are the same? it would make sense... call it `end`? (do we?)
10395 * productions with names with arbitrary characters in them.
10496 * something like «foo» but foo is the name of a *non*terminal — symbolic
120112 I don't think this is very necessary because you can usually just say
121113 `(foo & bar) | baz` — but only if `bar` always succeeds, which it
122114 usually does (to return something)
123
115 * `(foo → S | ok)` & print S ... should set S to error if foo failed?
116 or `(foo |→ S ok)` ?