# (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: @(#)exceps.awk	1.3 3/13/90

BEGIN {
  FS = RS
  opnum = 0
}

/builtin_exception: ordered enumeration/,/;/ {
  line = $1

  while (index(line, "'") != 0) {
    line = substr(line, index(line, "'")+1)
    endquote = index(line, "'")
    op = substr(line, 1, endquote-1)
    print op "	{ yylval.integer = " opnum "; Treturn(BUILTIN_EXCEPTION); }"
    opnum++
    line = substr(line, endquote+1)
  }
}
