diff options
| author | Marc Vertes <mvertes@free.fr> | 2025-07-29 20:11:46 +0200 |
|---|---|---|
| committer | Marc Vertes <mvertes@free.fr> | 2025-07-29 20:11:46 +0200 |
| commit | 30a3865247db70d55eedb200a2175747f38c4143 (patch) | |
| tree | f283a6fa628e43a611d26bf9265f26612cf168e0 /ev | |
| parent | b4eb1e9ae2fed94726699d5e0a47542dbce5fbc1 (diff) | |
fixup
Diffstat (limited to 'ev')
| -rwxr-xr-x | ev | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -19,8 +19,7 @@ BEGIN { function scan() { sub(/^[ \t]+/, "", line) - # print "# line: '" line "'" - if (match(line, /^[.0-9]+/)) { + if (match(line, /^[0-9]([.0-9]*(e[+-]*)*[0-9])*/)) { tok = "d" substr(line, 1, RLENGTH) } else if (match(line, /^([][}{)(,+-=?:]|[*\/รท\^])/)) { tok = substr(line, 1, RLENGTH) @@ -31,9 +30,7 @@ function scan() { } else { tok = "b" substr(line, 1, 1) } - # cnum += RLENGTH line = substr(line, RLENGTH+1) - # print "# scan: RLENGTH=" RLENGTH return RLENGTH } @@ -58,7 +55,7 @@ function parse( stack, sl, i) { # for (j = 0; j < i; j++) printf("%s ", code[j]); print "" } -# TODO: assign +# TODO: assign, if, while, function function run( c, i, l, t) { cl = length(code) ml = length(mem) @@ -81,5 +78,5 @@ function run( c, i, l, t) { i++ } print mem[ml] - for (i = ml; i in mem; i++) delete mem[i] + # for (i = ml; i in mem; i++) delete mem[i] } |
