diff options
author | Case Duckworth | 2022-07-08 15:59:49 -0500 |
---|---|---|
committer | Case Duckworth | 2022-07-08 15:59:49 -0500 |
commit | 5b118beecaa86bf5230e992be9718db643392253 (patch) | |
tree | 2c637070b0b974ffd460e47d63d8106b183bb430 | |
download | squ.awk-5b118beecaa86bf5230e992be9718db643392253.tar.gz squ.awk-5b118beecaa86bf5230e992be9718db643392253.zip |
Initial commit
-rwxr-xr-x | squ.awk | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/squ.awk b/squ.awk new file mode 100755 index 0000000..d4753a0 --- /dev/null +++ b/squ.awk | |||
@@ -0,0 +1,31 @@ | |||
1 | #!/usr/bin/awk -f | ||
2 | # SQU.AWK --- a lisp in awk | ||
3 | # (C) 2022 Case Duckworth <acdw@acdw.net> | ||
4 | |||
5 | ### Commentary: | ||
6 | |||
7 | # Why am I doing this? | ||
8 | |||
9 | ### Code: | ||
10 | BEGIN { | ||
11 | nested = 0 | ||
12 | buffer = "" | ||
13 | } | ||
14 | |||
15 | { | ||
16 | buffer = buffer $0 "\n" | ||
17 | } | ||
18 | |||
19 | END { | ||
20 | ast = read(buffer) | ||
21 | eval(ast) | ||
22 | } | ||
23 | |||
24 | |||
25 | function eval(buf) | ||
26 | { | ||
27 | } | ||
28 | |||
29 | function read(buf) | ||
30 | { | ||
31 | } | ||