diff --git a/lang/basic/src/build.lua b/lang/basic/src/build.lua index c02e9621e..3f09611fa 100644 --- a/lang/basic/src/build.lua +++ b/lang/basic/src/build.lua @@ -9,12 +9,11 @@ normalrule { name = "tokentab_h", ins = { "./maketokentab", - "util/cmisc+ed", matching(filenamesof("+llgen"), "/Lpars.h$"), }, outleaves = { "tokentab.h" }, commands = { - "%{ins} %{outs}" + "%{ins[1]} < %{ins[2]} > %{outs}" } } diff --git a/lang/basic/src/maketokentab b/lang/basic/src/maketokentab index c388c5d99..ee6e8a4e0 100755 --- a/lang/basic/src/maketokentab +++ b/lang/basic/src/maketokentab @@ -1,17 +1,6 @@ #!/bin/sh -$1 -s "${2:-Lpars.h}" > $3 <<'+' -1d -1,$s/# *define // -1,$s/ ...$// -1,$s/^/ "/ -1,$-1s/$/",/ -$s/$/"/ -0a -char *tokentab[] = { -. -$a -}; -. -1,$p -+ +echo "char* tokentab[] = {" +awk '/^#define/ { print "\"" $2 "\"," }' +echo "};" +