# (C) Copyright International Business Machines Corporation 23 January 
# 1990.  All Rights Reserved. 
#  
# See the file USERAGREEMENT distributed with this software for full 
# terms and conditions of use. 
# SCCS Info: @(#)opcodes.awk	1.5 3/14/90

BEGIN {
	FS = "|"
	opcode = 0
}


/^[a-z]/ {
	if (index("ABCDEFGHIJKLMNOPQRSTUVWXYZ", substr($0, 1, 1)) != 0)
	  next
	if (opcode == 0)
	  start = "  "
	else
	  start = "  , "

	endop = index($1, " ")-1
	if (endop < 1)
	  endop = length($1)

	op = substr($1, 1, endop)
	print $1 "	{ yylval.integer = opcode__" $1 "; Treturn(OPCODE); }" > "oplex.lex"
	print "void o_" $1 "();" > "opfuncdefs.h"
	opcode++
}
