ack/lang/basic/src/maketokentab

18 lines
151 B
Text
Raw Normal View History

#!/bin/sh
$1 -s "${2:-Lpars.h}" > $3 <<'+'
1988-07-04 11:45:41 +00:00
1d
1993-06-09 10:34:48 +00:00
1,$s/# *define //
1,$s/ ...$//
1,$s/^/ "/
1,$-1s/$/",/
$s/$/"/
1988-07-04 11:45:41 +00:00
0a
char *tokentab[] = {
.
$a
1988-07-04 11:45:41 +00:00
};
.
2016-08-11 22:19:51 +00:00
1,$p
1988-07-04 11:45:41 +00:00
+