diff options
author | Russ Cox <rsc@golang.org> | 2009-07-31 09:45:39 -0700 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-07-31 09:45:39 -0700 |
commit | 1ad950ebb97ae1ec4ea5b5539e3779f23ef73120 (patch) | |
tree | 2b4fc317ec36abefeaedacaad8d5a8aba74e0127 /src/cmd/gc/mkopnames | |
parent | 8420678fd3573104b405d287d25d171ada9c5bb6 (diff) | |
download | golang-1ad950ebb97ae1ec4ea5b5539e3779f23ef73120.tar.gz |
missed in last checkin
R=ken
OCL=32581
CL=32581
Diffstat (limited to 'src/cmd/gc/mkopnames')
-rwxr-xr-x | src/cmd/gc/mkopnames | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/cmd/gc/mkopnames b/src/cmd/gc/mkopnames new file mode 100755 index 000000000..a161817f9 --- /dev/null +++ b/src/cmd/gc/mkopnames @@ -0,0 +1,20 @@ +#!/bin/sh +# Copyright 2009 The Go Authors. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. + +echo '// auto generated by mkopnames' +echo 'static char*' +echo 'opnames[] = ' +echo '{' +sed -n '/OXXX/,/OEND/p' go.h | + cpp | + sed 's!//.*!!; /^#/d' | + tr ' ' '\n' | + tr -d ' \t,' | + grep . | + sort | + grep -v '^OEND$' | + sed 's/O//; s/.*/ [O&] = "&",/' +echo '};' + |