Initial version
This commit is contained in:
18
util/grind/make.ops
Executable file
18
util/grind/make.ops
Executable file
@@ -0,0 +1,18 @@
|
||||
awk '
|
||||
BEGIN { n = 0 }
|
||||
{ print "#define " $1 " " n; n++
|
||||
if ($3 !~ /0/) print "extern int " $3 "();" ;
|
||||
}
|
||||
' < $1 > ops.h
|
||||
|
||||
cat > ops.c <<'EOF'
|
||||
#include "operator.h"
|
||||
#include "ops.h"
|
||||
|
||||
t_operator operators[] = {
|
||||
EOF
|
||||
awk ' { print "{ " $2 ", " $3 "}, /* " $1 " */" }' < $1 >> ops.c
|
||||
cat >> ops.c <<'EOF'
|
||||
{ 0, 0 }
|
||||
};
|
||||
EOF
|
||||
Reference in New Issue
Block a user