git @ Cat's Eye Technologies Tamsin / 55268a4
Go over TODO. Chris Pressey 10 years ago
1 changed file(s) with 29 addition(s) and 17 deletion(s). Raw diff Collapse all Expand all
00 TODO
1 ----
1 ====
2
3 ### higher-priority ###
24
35 * don't consume stdin until asked to scan. demand_buffer. per-line loop.
46 or rather, per-inputconsumechunk
7 * apropos to that, using an ad-hoc syntax, is:
8 * `production @ %stdin` is the default; it is implied when no `@`
9 * `production @ %mmap` to use the mmap scanner
10 * `production @ %line` to use an interactive terminal line editor-ish
11 scanner or something.
12 * `$:add`, `$:sub`, `$:mul`, `$:div`, `$:rem`, for atoms which look like
13 integers: `["-"] & {$:digit}`. or for an actual integer type.
14 * `$:tell` and `$:seek` the implicit buffer — for VM's etc — although
15 note, this may have scary consequences when combined with backtracking
16 * error reporting: line and column number (at least in Python version)
17 * pattern match in send: (can't go in set b/c it looks like a nonterminal)
18 * `fields → fields(H,T) & H`
19 * codegen and emitter phases in compiler. take current compiler phase,
20 make it construct a low-level representation instead (codegen), then
21 have a phase that writes out C code from that low-level repr (emitter)
522
623 ### testing ###
724
1330 * test for mismatched # of formals in prod branches
1431 * document the modules. in own document. plus tests.
1532
16 ### support for simulating machines and vms ###
17
18 * `$:add`, `$:sub`, `$:mul`, `$:div`, `$:rem`, for atoms which look like
19 integers: `["-"] & {$:digit}`.
20 * `$:tell` and `$:seek` the implicit buffer -- for VM's etc -- although
21 note, this may have scary consequences when combined with backtracking
22 * non-backtracking versions of `|` and `{}`: `|!` and `{}!`
23
2433 ### lower-priority ###
2534
2635 * `ctype` module, with `alpha` and `digit` and etc.
2736 * `list` module: `deep_reverse`
2837 * use Tamsin repr in error messages
2938 * __str__ should be Tamsin repr()?
30 * `format`, using `@` -- in Tamsin
39 * `format`, using `@` — in Tamsin (don't we have this?)
3140 * `\s` production for whitespace
32 * `\f` escape for form feed
41 * `\f` escape for form feed (why??)
42 * non-backtracking versions of `|` and `{}`: `|!` and `{}!`
3343 * have compiler replace calls to `list` functions
3444 by "more efficient" versions written in C -- if they really are...
3545 * and maybe even garbage-collect terms in libtamsin
4858 * SOME WAY TO DISTINGUISH PRODUCTIONS WHICH MAY CONSUME INPUT AND
4959 PRODUCTIONS WHICH NEVER CONSUME INPUT (in the `$` module, and generally).
5060 * actual numeric values, rather than atoms-which-contain-only-digits
51 * error reporting: line number
5261 * error handling: skip to next sentinel and report more errors
5362 * module-level updatable variables. or globals. or "process dictionary"
5463 `$:store()` and `$:fetch()`. or database.
5766 * should be able to import ("open") other modules into your own namespace.
5867 * `@` a la Haskell in pattern-match:
5968 * `walk(T@tree(L,R)) = ...`
60 * pattern match in send: (can't go in set b/c it looks like a nonterminal)
61 * `fields → fields(H,T) & H`
6269 * maps, implemented as hash tables.
6370 * `Table ← {} & fields → F@fields(H,T) & Table[H] ← T`
6471 * on that topic — production values and/or lambda productions...
6976 * `~` (Lua) for not and `!` (Prolog) for non-backtracking?
7077 * lowercase greek letters are variables too!
7178 * use `←` instead of `@`, why not?
72 * `A;B` — like `&` except assert (statically) that `A` always succeeds?
79 * I'm always typing `prod() → rule` instead of `=`, so why not?
80 * `A;B` — like `&` except assert (statically) that `A` always succeeds
7381 * be generous and allow `"xyz"` in term context position?
7482 * denotational semantics sugar! something like...
7583
92100 * analysis: may_backtrack(Rule)
93101 * analysis: may_consume_input(Rule)
94102 * regex-like shortcuts: `\w` for "word", `\s` for "whitespace", etc.
95 * EOF and nil are the same? it would make sense... call it `end`?
103 * EOF and nil are the same? it would make sense... call it `end`? (do we?)
96104 * productions with names with arbitrary characters in them.
97105 * something like «foo» but foo is the name of a *non*terminal — symbolic
98106 production references (like Perl's horrible globs as a cheap substitute
109117 * special form that consumes rest of input from the Tamsin source --
110118 maybe not such a gimmick since micro-tamsin does this
111119 * feature-testing: `$.exists(module) | do_without_module`
112 * ternary: `foo ? bar : baz` -- if foo succeeded, do bar, else do baz.
120 * ternary: `foo ? bar : baz` — if foo succeeded, do bar, else do baz.
121 I don't think this is very necessary because you can usually just say
122 `(foo & bar) | baz` — but only if `bar` always succeeds, which it
123 usually does (to return something)
124