#include	"c_varieties.h"
#if __EXTERN_C__
EXTERN_FUNCTION (extern int yylook,());
EXTERN_FUNCTION (extern int yywrap,());
EXTERN_FUNCTION (extern int yyback, (int *, int));
#elif defined (__cplusplus) || defined (c_plusplus)
	extern int yylook();
	extern int yywrap();
	extern int yyback(int *, int);
#endif
# include "stdio.h"
# define U(x) x
# define NLSTATE yyprevious=YYNEWLINE
# define BEGIN yybgin = yysvec + 1 +
# define INITIAL 0
# define YYLERR yysvec
# define YYSTATE (yyestate-yysvec-1)
# define YYOPTIM 1
# define YYLMAX BUFSIZ
# define lex_output(c) putc(c,yyout)
# define lex_input() (((yytchar=yysptr>yysbuf?U(*--yysptr):getc(yyin))==10?(yylineno++,yytchar):yytchar)==EOF?0:yytchar)
# define unput(c) {yytchar= (c);if(yytchar=='\n')yylineno--;*yysptr++=yytchar;}
# define yymore() (yymorfg=1)
# define ECHO fprintf(yyout, "%s",yytext)
# define REJECT { nstr = yyreject(); goto yyfussy;}
int yyleng; extern char yytext[];
int yymorfg;
extern char *yysptr, yysbuf[];
int yytchar;
FILE *yyin = {stdin}, *yyout = {stdout};
extern int yylineno;
struct yysvf { 
	struct yywork *yystoff;
	struct yysvf *yyother;
	int *yystops;};
struct yysvf *yyestate;
extern struct yysvf yysvec[], *yybgin;

/*****************************************************************/
/**                                                             **/
/**             (C) Copyright 1992 the Regents of the           **/
/**        University of California.  All Rights Reserved.      **/
/**                                                             **/
/**        This work was produced under the sponsorship of      **/
/**         the U.S. Department of Energy.  The Government      **/
/**                retains certain rights therein.              **/
/**                                                             **/
/**                         Written by                          **/
/**         Distributed Programming Environments Project        **/
/**           Computer Software and Networking Division,        **/
/**                   Livermore Computer Center,                **/
/**            Lawrence Livermore National Laboratory           **/
/**                                                             **/
/*****************************************************************/

#define SILENT_SCAN

#ifdef SILENT_SCAN
#undef lex_output

/*
 * make lex_output do nothing, but make compiler think that the argument 'c'
 * is used, so it doesn't complain. also, make ECHO do nothing
 */

#define lex_output(c) (putc(((c)==0?'\000':'\000'),yyout))
#ifdef ECHO
#undef ECHO
#endif
#define ECHO /* nothing */
#endif


#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include "abs.h"
#include "decls.h"
#include "keytab.h"
#include "symtab.h"
#include "misc.h"
#include "pnode.h"
#include "y.tab.h"

#define MAX_PRIM_LEN 17		/* maximum string length of a primitive name */
				/* currently big enough for ObjectIdentifier */
char prim_name[MAX_PRIM_LEN];	/* buffer to hold primitive name 	     */
int prim_name_len;		/* length of the primitive name		     */

#define MAX_DIGITS 64		/* max string length of a length specification */
char len1[MAX_DIGITS];		/* buffer to hold length specification digits */
char len2[MAX_DIGITS];		/* buffer to hold length specification digits */

#define EXTRA_CHARS 10		/* __ROt_nameinyytext_0_0     */
				/* \    /            \  /     */
				/*  \  /              \/      */
				/*    6        +       4 = 10 */
#define INIT_EXPBUF_SIZE 256

/* assumes the translation of the string in arg will be no longer than */
/* EXTRA_CHARS longer than the string in arg             */

void prepare_expbuf(char* arg);
#define RETURNIT(arg)						\
   prepare_expbuf(yytext);					\
   yylval.bufoffset = last_bufoffset;				\
   strcpy(expbuf+last_bufoffset, yytext);			\
   return (arg)

#define RET(arg)						\
      {make_string();						\
      prepare_expbuf(yytext);					\
      yylval.string_bufoffset.bufoffset = last_bufoffset;	\
      strcpy(expbuf+last_bufoffset, yytext);			\
      return (arg);}

#define CONTDATMACRO							\
	  char *iname;							\
	  interface_element  *tmp_ieptr;				\
	  iname = (char*)malloc(strlen(yytext)+1);				\
	  if ((sscanf(yytext, "%*[^(] ( %[^) ]", iname)) == 1) {	\
	     IdentMode = MODE_INTERFACE;				\
	     (void)identify(iname); 					\
	     tmp_ieptr = yylval.interface_eptr;				\
	     yylval.ieptr_bufoffset.ieptr = tmp_ieptr;			\
	  }								\
	  else {							\
		BUG_CHECK("Interface must be specified");           	\
	  }								\
	  prepare_expbuf("__RO_Instance_Record_ptr ");			\
	  strcpy(expbuf+last_bufoffset,"__RO_Instance_Record_ptr ");	\
	  yylval.ieptr_bufoffset.bufoffset = last_bufoffset;		\
	  IdentMode = MODE_IDENT;
 
# define Interf 2
# define YYNEWLINE 10
yylex(){
int nstr; extern int yyprevious;
while((nstr = yylook()) >= 0)
#ifdef YYFUSSY
yyfussy:
#endif
	 switch(nstr){
case 0:
if(yywrap()) return(0); break;
case 1:
              { ECHO; RETURNIT( LPAR ); }
break;
case 2:
              { ECHO; RETURNIT( RPAR ); }
break;
case 3:
              { ECHO; RETURNIT( LBRACE ); }
break;
case 4:
              { ECHO; RETURNIT( RBRACE ); }
break;
case 5:
              { ECHO; RETURNIT( LANGLE ); }
break;
case 6:
              { ECHO; RETURNIT( RANGLE ); }
break;
case 7:
              { ECHO; RETURNIT( LBRACK ); }
break;
case 8:
              { ECHO; RETURNIT( RBRACK ); }
break;
case 9:
              { ECHO; RETURNIT( COMMA ); }
break;
case 10:
          { ECHO; RETURNIT( SEMI ); }
break;
case 11:
	  { ECHO; RETURNIT( EQUALS ); }
break;
case 12:
	  { ECHO; RETURNIT( DOT ); }
break;
case 13:
	  { ECHO; RETURNIT( AMPER ); }
break;
case 14:
	  { ECHO; RETURNIT( BANG ); }
break;
case 15:
	  { ECHO; RETURNIT( TILDE ); }
break;
case 16:
	  { ECHO; RETURNIT( MINUS ); }
break;
case 17:
	  { ECHO; RETURNIT( PLUS ); }
break;
case 18:
	  { ECHO; RETURNIT( STAR ); }
break;
case 19:
	  { ECHO; RETURNIT( SLASH ); }
break;
case 20:
	  { ECHO; RETURNIT( PERCENT ); }
break;
case 21:
	  { ECHO; RETURNIT( COMP ); }
break;
case 22:
	  { ECHO; RETURNIT( BITOR ); }
break;
case 23:
	  { ECHO; RETURNIT( QUES ); }
break;
case 24:
            { ECHO; RETURNIT( ELLIPSIS      ); }
break;
case 25:
	  { ECHO; RETURNIT( RIGHT_ASSIGN  ); }
break;
case 26:
	  { ECHO; RETURNIT( LEFT_ASSIGN   ); }
break;
case 27:
	  { ECHO; RETURNIT( ADD_ASSIGN    ); }
break;
case 28:
	  { ECHO; RETURNIT( SUB_ASSIGN    ); }
break;
case 29:
	  { ECHO; RETURNIT( MUL_ASSIGN    ); }
break;
case 30:
	  { ECHO; RETURNIT( DIV_ASSIGN    ); }
break;
case 31:
	  { ECHO; RETURNIT( MOD_ASSIGN    ); }
break;
case 32:
	  { ECHO; RETURNIT( AND_ASSIGN    ); }
break;
case 33:
	  { ECHO; RETURNIT( XOR_ASSIGN    ); }
break;
case 34:
	  { ECHO; RETURNIT( OR_ASSIGN     ); }
break;
case 35:
	  { ECHO; RETURNIT( RIGHT_OP      ); }
break;
case 36:
	  { ECHO; RETURNIT( LEFT_OP       ); }
break;
case 37:
	  { ECHO; RETURNIT( INC_OP        ); }
break;
case 38:
	  { ECHO; RETURNIT( DEC_OP        ); }
break;
case 39:
	  { ECHO; RETURNIT( PTR_OP        ); }
break;
case 40:
	  { ECHO; RETURNIT( AND_OP        ); }
break;
case 41:
	  { ECHO; RETURNIT( OR_OP         ); }
break;
case 42:
	  { ECHO; RETURNIT( LE_OP         ); }
break;
case 43:
	  { ECHO; RETURNIT( GE_OP         ); }
break;
case 44:
	  { ECHO; RETURNIT( EQ_OP         ); }
break;
case 45:
	  { ECHO; RETURNIT( NE_OP         ); }
break;
case 46:
             { ECHO; RETURNIT( ARROW         ); }
break;
case 47:
              { 
                    /* Sometimes a colon is pushed back into the input
                     * stream, but we don't want to echo it twice. */

                    if (!no_lex_echo) {
		      ECHO;
		    }
                    else {
		      no_lex_echo = FALSE;
		    }
                    RETURNIT( COLON );
		  }
break;
case 48:
        { 
                    ECHO;
                    squeeze_underscores();  
                    RET( NATNUM_CONST );  
                  }
break;
case 49:
        {  
                    ECHO;
                    squeeze_underscores();  
                    RET( INTEGER_CONST );  
                  }
break;
case 50:
     {  
                    ECHO;
                    squeeze_underscores();  
                    RET( REAL_CONST );  
                  }
break;
case 51:
            {  
                    ECHO;
                    RET( HEX_CONST );  
                  }
break;
case 52:
         {  
                    ECHO;
                    RET( OBJ_ID_CONST );  
                  }
break;
case 53:
     {   
                    ECHO;  
                    RET( CHAR_CONST );  
                  }
break;
case 54:
     {   
                    ECHO;  
                    RET( BOOLEAN_CONST );  
                  }
break;
case 55:
     { ECHO; return( ONCOM_ERROR      ); }
break;
case 56:
{ ECHO; return( ONINTERNAL_ERROR ); }
break;
case 57:
{ ECHO; return( ONPROTOCOL_ERROR ); }
break;
case 58:
    { ECHO; return( ONMISSING_OP     ); }
break;
case 59:
   { ECHO; return( ONMISSING_ARG    ); }
break;
case 60:
    { ECHO; return( ONNAME_ERROR     ); }
break;
case 61:
          { ECHO; return( ONDONE           ); }
break;
case 62:
     { ECHO; return( ONBAD_OP_ID      ); }
break;
case 63:

	{
	    enum abstr_kind ak;
	    enum abstr_kind *which = &ak;
	    ECHO;
	    sscanf(yytext,"%[^( ]",prim_name);
	    if (!is_primitive(prim_name,which)) {
	     report_error("internal error",
			  "lexKeyword should have found primary: <%s>.",
			  prim_name);
	     exit(1);
	    }
	    yylval.ak_len1_len2_bufoffset.abstr_kind = ak;
	    prim_name_len = strlen(prim_name);
	    sscanf(yytext+prim_name_len," ( %[^, ] , %[^) ]",len1,len2);
	    yylval.ak_len1_len2_bufoffset.len1 = len1;
	    yylval.ak_len1_len2_bufoffset.len2 = len2;
	    prepare_expbuf(yytext);
   	    yylval.ak_len1_len2_bufoffset.bufoffset = last_bufoffset;
	    sprintf(expbuf+last_bufoffset,"__ROt_%s_%s_%s",prim_name,len1,len2);
	    if (changeable_mode) IdentMode = MODE_IDENT;
	    return (ELROS_BASE_TYPE);
	 }
break;
case 64:

	{
	    enum abstr_kind ak;
	    enum abstr_kind *which = &ak;
	    ECHO;
	    sscanf(yytext,"%[^( ]",prim_name);
	    if (!is_primitive(prim_name,which)) {
	     report_error("internal error",
			  "lexKeyword should have found primary <%s>.",
			  prim_name);
	     exit(1);
	    }
	    yylval.ak_len1_len2_bufoffset.abstr_kind = ak;
	    prim_name_len = strlen(prim_name);
	    sscanf(yytext+prim_name_len," ( %[^, ] , %[^) ]",len1,len2);
	    prepare_expbuf(yytext);
	    yylval.ak_len1_len2_bufoffset.len2 = len2;
   	    yylval.ak_len1_len2_bufoffset.bufoffset = last_bufoffset;
	    if (strcmp(len1,"*")) {
	      yylval.ak_len1_len2_bufoffset.len1 = len1;
	      sprintf(expbuf+last_bufoffset,"__ROt_%s_%s_%s",prim_name,len1,len2);
            }
            else {
	      yylval.ak_len1_len2_bufoffset.len1 = "0";
	      sprintf(expbuf+last_bufoffset,"__ROt_%s_0_%s",prim_name,len2);
            }
	    if (changeable_mode) IdentMode = MODE_IDENT;
	    return (ELROS_BASE_TYPE);
	 }
break;
case 65:

	{
	    enum abstr_kind ak;
	    enum abstr_kind *which = &ak;
	    ECHO;
	    sscanf(yytext,"%[^( ]",prim_name);
	    if (!is_primitive(prim_name,which)) {
	     report_error("internal error",
			  "lexKeyword should have found primary <%s>.",
			  prim_name);
	     exit(1);
	    }
	    yylval.ak_len1_len2_bufoffset.abstr_kind = ak;
	    prim_name_len = strlen(prim_name);
	    sscanf(yytext+prim_name_len," ( %[^) ]",len1);
	    yylval.ak_len1_len2_bufoffset.len1 = len1;
	    yylval.ak_len1_len2_bufoffset.len2 = "0";
	    prepare_expbuf(yytext);
   	    yylval.ak_len1_len2_bufoffset.bufoffset = last_bufoffset;
	    sprintf(expbuf+last_bufoffset, "__ROt_%s_%s_0", prim_name,len1);
	    if (changeable_mode) IdentMode = MODE_IDENT;
	    return (ELROS_BASE_TYPE);
	}
break;
case 66:

	{
	    enum abstr_kind ak;
	    enum abstr_kind *which = &ak;
	    ECHO;
	    sscanf(yytext,"%[^( ]",prim_name);
	    if (!is_primitive(prim_name,which)) {
	     report_error("internal error",
			  "lexKeyword should have found primary <%s>.",
			  prim_name);
	     exit(1);
	    }
	    yylval.ak_len1_len2_bufoffset.abstr_kind = ak;
	    prim_name_len = strlen(prim_name);
	    sscanf(yytext+prim_name_len," ( %[^) ]",len1);
	    yylval.ak_len1_len2_bufoffset.len2 = "0";
	    prepare_expbuf(yytext);
   	    yylval.ak_len1_len2_bufoffset.bufoffset = last_bufoffset;
            if (strcmp(len1,"*")) {
	       yylval.ak_len1_len2_bufoffset.len1 = len1;
	       sprintf(expbuf+last_bufoffset, "__ROt_%s_%s_0", prim_name,len1);
            }
	    else {
	       yylval.ak_len1_len2_bufoffset.len1 = "0";
	       sprintf(expbuf+last_bufoffset, "__ROt_%s_0_0", prim_name);
            }
	    if (changeable_mode) IdentMode = MODE_IDENT;
	    return (ELROS_BASE_TYPE);
	}
break;
case 67:
{

	    enum abstr_kind ak;
	    enum abstr_kind *which = &ak;
	    ECHO;
	    if (!is_primitive(yytext,which)) {
	     report_error("internal error",
			  "lexKeyword should have found primary <%s>.",
			  prim_name);
	     exit(1);
	    }
	    yylval.ak_len1_len2_bufoffset.abstr_kind = ak;
	    yylval.ak_len1_len2_bufoffset.len1 = "0";
	    yylval.ak_len1_len2_bufoffset.len2 = "0";
	    prepare_expbuf(yytext);
   	    yylval.ak_len1_len2_bufoffset.bufoffset = last_bufoffset;
	    strcpy(expbuf+last_bufoffset, "__ROt_Null_0_0");
	    if (changeable_mode) IdentMode = MODE_IDENT;
	    return (ELROS_BASE_TYPE);
	 }
break;
case 68:
{

	    enum abstr_kind ak;
	    enum abstr_kind *which = &ak;
	    ECHO;
	    if (!is_primitive(yytext,which)) {
	     report_error("internal error",
			  "lexKeyword should have found primary <%s>.",
			  prim_name);
	     exit(1);
	    }
	    yylval.ak_len1_len2_bufoffset.abstr_kind = ak;
	    yylval.ak_len1_len2_bufoffset.len1 = "0";
	    yylval.ak_len1_len2_bufoffset.len2 = "0";
	    prepare_expbuf(yytext);
   	    yylval.ak_len1_len2_bufoffset.bufoffset = last_bufoffset;
	    strcpy(expbuf+last_bufoffset, "__RO_Memory");
	    if (changeable_mode) IdentMode = MODE_IDENT;
	    return (ELROS_BASE_TYPE);
	 }
break;
case 69:

	{
	  CONTDATMACRO
	  ECHO;
	  return (CONTROL_DECL);
	}
break;
case 70:

	{
	  CONTDATMACRO
	  ECHO;
	  return (DATA_DECL);
	}
break;
case 71:

	{
	  ECHO;
	  return lexIdAtSign();
	}
break;
case 72:

	{
	  ECHO;
	  if (no_labels_now > 0) {
	    no_lex_echo = TRUE;
	    unput(':');
	    return lexIdColon();
	  }
	  else {
	    RETURNIT (STMT_LABEL);
	  }
	}
break;
case 73:

	{
	  ECHO;
	  return scope_resolve();
	}
break;
case 74:

	{
	  /* sometimes the above rule pushes everything after :: back
	   * into the input stream, and it gets lexed again here. 
	   * Don't echo a second time */

	  if (!no_lex_echo) {
	    ECHO;
	  }
	  else {
	    no_lex_echo = FALSE;
	  }
	  return scope_resolve();
	}
break;
case 75:
      	  
	{
	  ECHO;
	  if (in_config_file)
	    return CONFIG_COMMENT;
	  else {
	    if (in_interface_spec)
	       clear_expbuf(last_bufoffset);
	    else
	       dump_expbuf(last_bufoffset);
	    if (!strncmp(yytext+1,"include",7) ||
	        !strncmp(yytext+1,"define",6)  ||
                !strncmp(yytext+1,"undef",5)   ||
                !strncmp(yytext+1,"if",2)      || /* if, ifdef, ifndef */
	        !strncmp(yytext+1,"else",4)    ||
                !strncmp(yytext+1,"elif",4)    ||
		!strncmp(yytext+1,"pragma",6)  ||
		!strncmp(yytext+1,"error",5)   ||
	        !strncmp(yytext+1,"endif",5)     )

		/* let #directive pass through */
		fprintf(out,"%s", yytext);

	    else { /* process line directive */
	       char ch;
	       int start;
	       int i;
	       int newlen;							
	       newlen = strlen(yytext)+1;
	       if (linedir_file) {
		  if (newlen > linedir_file_size) {
		     linedir_file_size += ((linedir_file_size > newlen)
					 ? linedir_file_size
					 : newlen); 
		     if ((linedir_file = (char*)realloc(linedir_file,linedir_file_size)) 
			  == NULL) nomem();		      
		  }
	       }
	       else {
		 BUG_CHECK("Space should have been malloced at END_CONFIG");
	       }
	       for (i = 1 ; yytext[i] != '\n' ; i++ ) {
		  if (isdigit(yytext[i])) {
		     start = i;
		     while (isdigit(yytext[++i]))
			;
		     ch = yytext[i];
		     yytext[i] = '\0';
		     linedir_line = atoi(yytext+start);
		     yytext[i] = ch;

		     while ( yytext[i++] != '\"')
			; /*scanforquote */
		     start = 0;
		     while (yytext[i] != '\"')
			linedir_file[start++] = yytext[i++];
		     linedir_file[start] = '\0';
		     break;
		  }
	       }
	       linedir_line -=1; /* the newline at end of 
				    this directive must be 
				    taken into account   */
	       if (global.line_dirs) fprintf(out,"%s",yytext);
	    }
	 }
	}
break;
case 76:

	{
	  ECHO;
          return (identify(yytext));
	}
break;
case 77:

	{
	  ECHO;
	  RET(STRING_CONST);
	}
break;
case 78:

	{
	  ECHO;
	  prepare_expbuf(yytext);
	  strcpy(expbuf+last_bufoffset, yytext);
	  linedir_line++;
	}
break;
case 79:

	{
	  ECHO;
	  prepare_expbuf(yytext);
	  strcpy(expbuf+last_bufoffset, yytext);
	  if (isspace(yytext[0])) 

	    /* whitespace just gets dropped on the floor */
	    ;

	  else if (isprint(yytext[0])) {

	    /* When we've finished the parameters.dat (config) file, 
             * we push $ onto the start of the input stream to denote this. 
             * The $ is recognized by this
	     * lex rule, so the we can return the END_CONFIG token. 
             * This token is 
	     * necessary because the final token of the config file 
             * can legally be
             * LONG, and the start of a C program can legally be long. 
             * LONG LONG is
	     * therefore a parsing conflict, and shifting is not necessarily
 	     * always correct - it's wrong in the case given above:
	     * LONG <end-of-file> LONG. Shifting is incorrect, 
             * the 2nd LONG is not
	     * part of a config directive, it's a C decl. */

	    if ((yytext[0]) == '$') {
	      if (config_just_ended) {
                config_just_ended = FALSE;
		last_bufoffset = 0;
		*expbuf = '\0';
		if (input_file) {
		   linedir_file_size = strlen(input_file)+1;  
		   if ((linedir_file = (char*)malloc(linedir_file_size)) == NULL) 
		     nomem();
		   strcpy(linedir_file,input_file);
		}
		else {
		  BUG_CHECK("input_file wasn't specified");
		}
		linedir_line = 1;
                return END_CONFIG;
              }
            }
	    fprintf(yyout," Discarding illegal character: '%c' (%o octal)\n", 
	                  yytext[0],
	                  ((int)(yytext[0])));

	    /* no return - just drop this character on the floor */
	  }
	  else {
	    
	    /* We'll throw away everything else, but print a warning. The
	     * standard does not define what to do here (2.2.1 lines 29-32) */
	   
	    fprintf(yyout," Warning! Discarding useless character: %o octal\n",
	                  ((int)(yytext[0])));
	  }
	}
break;
case -1:
break;
default:
fprintf(yyout,"bad switch yylook %d",nstr);
} return(0); }
/* end of yylex */

void BEGIN_Interf()
{BEGIN Interf;}

void END_Interf()
{BEGIN 0;}

int yywrap()
{
	if (oldyyin) {
	   fclose(yyin);
	   yyin = oldyyin;
	   if (!strcmp(input_file,parameters_dat_file)) {
	      in_config_file    = 0;

	      /* see the final rule above for the explaination of this
               * "$" character */

	      config_just_ended = TRUE;
	      unput('$');
	      oldyyin    = NULL;
	      input_file = oldinput_file;
	      linedir_line = 1;
	      return(0);
	   }
	   else {
	      report_error("internal error", 
	  		   "unexpected input file: %s.",
			   input_file);
	      exit(1);
	   }
	}
	else
	   return(1);

        /* Added for g++ */
        return (0);
}


void squeeze_underscores()
{
   int oldpos = 0,newpos = 0;
   char c;
   while (c = yytext[oldpos++]) 
      if (c != '_')
	 yytext[newpos++] = c;
   yytext[newpos] = '\0';
}


void  make_string()
{
  /* Takes the current yytext[] and malloc's enough space on the yacc stack
   * for it, then copies it in. */

  if ((yylval.string_bufoffset.string = (char*)malloc(strlen(yytext)+1)) == NULL) 
     nomem();
  strcpy(yylval.string_bufoffset.string,yytext);
}


int  lexIdColon()

     /* simply takes the white space and colon off of the yytext (see
      * the lex rule that calls this routine) and identifies the
      * resulting symbol */
{
  char *tracer;
  char *ident;

  /* start at the colon... */

  tracer = &(yytext[yyleng-1]);
  if (*tracer != ':') {
    report_error("internal error",
		 "lexIdColon: yytext doesn't end with ':' : %s.",
		 yytext);
    exit(1);
  }
  
  /* and search back for the end of the ident... */

  while (!isalnum(*tracer) && *tracer!='_') tracer--;
  *(++tracer) = '\0';

  /* make a string and identify it just like any other ident */

  if ((ident=NewThings(char,strlen(yytext)+1)) == NULL) nomem();
  strcpy(ident,yytext);
  yylval.string = ident;
  
  return identify(ident);
}


int  lexKeyword( char *word )

     /* this routine decides if the given word is a keyword, and
      * if so, returns the token after performing any actions 
      * necessary to lex that key. It is used by both identify() and
      * scope_resolve() as a first step. */
{
  Keyword *key_info;

  /* First check the Keyword_Table, if found, return the 
   * appropriate token. If it was a primitive elros type, notice that
   * we also put an abstr_kind on the yylval stack. In the other cases,
   * make_string has already been called to create the yylval.string */

  if ((key_info=Keyword_Table->lookup(word)) != NULL) {
    if (strcmp(word,key_info->name) == 0) {

      /* inside this switch is where we can "turn off" a particular 
       * kind of keyword with some arbitrary code. See KEY_CONFIG. */

      switch(key_info->kind) {

      case KEY_ANSI:
	RETURNIT(key_info->token);

      case KEY_ELROS:
	if (key_info->lflag) {
	  if (key_info->lflag == 2)
	     IdentMode = MODE_INSTANCE;
	  RETURNIT(key_info->token);
	}
	else if (in_interface_spec)
	  return(key_info->token);
	else
	  break;

      case KEY_CONFIG:
	if (in_config_file) 
	  return(key_info->token);
	else
	  break;

      case KEY_PRIM:
	return(key_info->token);

      case KEY_UNKNOWN:
      default:
	report_error("internal error",
		     "Unknown KeyKind: %d.",
		     key_info->kind);
	exit(1);
      }
    }
  }

  /* these aren't in the Keyword_Table because they aren't known until
   * the params file is read. The other keywords are known at 
   * compiler compile-time. */

  for (int i=0; i<bind_type_count; i++) {
    if (!strcmp(bind_type[i],word)) {
      yylval.string = bind_type[i];
      return BIND_TYPE;
    }
  }
  return NOT_A_KEY;
}

int  lexIdAtSign()

     /* Similar to scope_resolve, we have to crack ident1@ident2, and
      * ident1 has to be an operation within the interface of
      * ident2 (which it must be an instance variable). */
{
  char *tracer;
  char *opname;
  char *inst;
  link *linkptr;

  SymKind kind;

  symbol_element    *entry;
  interface_element *interf;
  operation_element *oeptr;
  instance_element *insteptr;

  /* break it apart, inserting a NUL char is OK because we're 
   * guarranteed at least one spare char, the @-sign */

  opname = tracer = yytext;
  while( isalnum(*tracer) || *tracer == '_' ) tracer++;
  *tracer = '\0';
  while( !isalnum(*tracer) && *tracer != '_' ) tracer++;
  inst = tracer;

  /* now find the interface for the instance, to get the instance info,
   * all we have to do is look it up in the symbol table */

  entry = Symbol_Table->lookup(inst,SMASK_C);
  
  /* Some error checking... */

  if (entry == NULL) {
    report_error("error 1",
		 "\"%s\" is not a declared instance.\n\tIllegal operation: %s@%s.", 
		 inst, opname, inst);
    linkptr = NULL;
    insteptr = NULL;
  }
  else {
     int reported = FALSE;

     switch(kind = entry->get_kind()) {
     case SYM_IDENT:
     case SYM_TYPEDEF:
     case SYM_INTER:
     case SYM_OP:
     case SYM_TYPE:
     case SYM_NAME:
       {
	 report_error("error 2",
		      "\"%s\" is a %s and can't be used as an\n\tinstance variable in \"%s@%s\".", 
		      inst,NameOfSymKind(kind),opname,inst);
	 reported = TRUE;
	 linkptr = NULL;
       }
       break;
     case SYM_UNKNOWN:
       {
	 BUG_CHECK("Bad symbol_table::lookup() result to lexIdAtSign()");
       }
     case SYM_INST:
       {
	 break;
       }
     }
     if (!reported && !instance_list_ptr->search(inst,linkptr)) {
	BUG_CHECK("Declared instance not on instance list"); 
	reported = TRUE;
	linkptr = NULL;
     }
     insteptr   = (instance_element*)linkptr;
     /* Error checks pass, get the instance's interface and lookup
      * the operation */

     if (!reported) {
	interf = entry->get_interf();
	if (interf) {
	   if (!interf->operations_ptr->search(opname,linkptr)) {
	     report_error("error 4",
			  "Operation \"%s\" not defined in Interface \"%s\".\n\tThis Interface is bound to instance \"%s\".",
			  opname, interf->get_name(), inst);
	     linkptr = NULL;
	   }
	}
	else {
	  BUG_CHECK("No Interface corresponding to the instance variable");
	}
     }
  }


  /* got it (finally!) set state, and tokenize as OPERATION_AT_INSTANCE,
   * which has the same yylval as OPERATION_NAME. A different token is
   * needed to remove the call_stmt / give_op_stmt conflict */

  oeptr   = (operation_element*)linkptr;
  yylval.oeptr_insteptr.oeptr = oeptr;
  yylval.oeptr_insteptr.insteptr = insteptr;
  return OPERATION_AT_INSTANCE;
}

int  lexInsideIspec( char *ident, interface_element *interf )

     /* Similar to lexKeyword(), this call looks up the identifier 
      * in the given i-spec, and makes some consistency checks, too. 
      * It returns the token for the identifier */
{
  int                 found;
  char               *iname;
  link               *linkptr;
  link               *saved_linkptr;
  SymKind             kind;
  operation_element  *oeptr;


  iname = interf->get_name();
  found = FALSE;
  kind  = SYM_UNKNOWN;

  /* search each table, if found, use a SymKind to indicate what it
   * is, and act on it after all checks are made. */

  if (interf->types_ptr) {
    if ((interf->types_ptr)->search(ident,linkptr)) {
      found         = TRUE;
      kind          = SYM_TYPE;
      saved_linkptr = linkptr;
    }
  }
  if (interf->names_ptr) {
    if ((interf->names_ptr)->search(ident,linkptr)) {
      if (found) {
	report_error("internal error",
		     "%s is both a type and a Name in Interface %s.", 
		     ident, iname);
	linkptr = NULL;
      }
      found         = TRUE;
      kind          = SYM_NAME;
      saved_linkptr = linkptr;
    }
  }
  if (interf->operations_ptr) {
    if ((interf->operations_ptr)->search(ident,linkptr)) {
      if (found) {
	report_error("internal error",
		     "%s is both an operation and a %s in Interface %s.", 
		     ident, kind==SYM_NAME?"name":"type", iname);
	linkptr = NULL;
      }
      found         = TRUE;
      kind          = SYM_OP;
      saved_linkptr = linkptr;
    }
  }
    
  /* All the checks pass, lex this ident */

  switch (kind) {
  case SYM_OP:
    {
      oeptr   = (operation_element*)saved_linkptr;
      yylval.operation_eptr = oeptr;
      return OPERATION_NAME;
    }
  case SYM_NAME:
    {
      yylval.name_eptr = (name_element*)saved_linkptr;
      return PARAMETER_NAME;
    }
  case SYM_TYPE:
    {
      type_element *tep;
      tep = yylval.teptr_bufoffset.teptr = (type_element*)saved_linkptr;
      ident = tep->abstr_type_ptr->get_typedef_name();
      prepare_expbuf(ident);
      yylval.teptr_bufoffset.bufoffset = last_bufoffset;
      strcpy(expbuf+last_bufoffset, ident);
      yylval.string_bufoffset_sym_ont.sym = SYM_TYPE;
      yylval.string_bufoffset_sym_ont.ont = (type_element*)saved_linkptr;
      return TYPE_ID;
    }
  case SYM_UNKNOWN:
    {
      /* it's OK not to find the symbol in the interface when it's first
       * being declared. It's grammatically an IDENTIFIER then. If this
       * routine is called from scope_resolve, however, and it gets 
       * IDENTIFER returned, it knows that the symbol was not found in the
       * specified interface */

      if (in_op_def_sect)
	 report_error("error 7",
		      "\"%s\" is not an ELROS type.",
		      yytext);
      yylval.string_bufoffset_sym_ont.sym = SYM_UNKNOWN;
      RET(IDENTIFIER);
    }
  case SYM_IDENT:
  case SYM_TYPEDEF:
  case SYM_INST:
  case SYM_INTER:
    {
      report_error("internal error",
		   "kind has impossible value: %d.",
		   (int) kind );
    }
  }
  BUG_CHECK("Can't get here.");
  return 0; /* keep lame compliers quiet */
}

int scope_resolve()

     /* All scope resolution is handled here, both forms (with an
      * interface name, and an empty interface name). The string passed
      * in contains everything needed */
{
  link *linkptr;

  int   token;
  char *tracer;
  char *iname;
  char *ident;
  char *string;

  interface_element *interf;


  string = yytext;

  /* scope resolution must not occur inside an Ispec */

  if (in_interface_spec) {
    report_error("error 8",
		 "Scope resolution not allowed inside an Interface\n\tspecification: %s.",
		 string);
  }

  /* if the first char of the string is ':', it's empty scope resolution,
   * if it's alphanumeric (or '_'), it's resolved to a particular 
   * interface. Otherwise, somethings wrong, and the lexer shouldn't
   * have called this routine - crash! */

  if (string[0] != ':' && string[0] != '_' && !isalnum(string[0])) {
    report_error("internal error",
		 "1st char in scope_resolve() isn't ':' or alphanumeric: '%c'.",
		 string[0]);
    exit(1);
  }

  if (string[0] == ':') {

    /* empty scope resolution - resolve to the C symbol by calling
     * identify with its second argument... */

    /* extract the identifier, and save it since we're going to call
     * identify, which assumes the usual make_string() call has been done
     * to the idents it receives (i.e. malloc and point to by yylval */

    tracer = string;
    while( !isalnum(*tracer) && *tracer != '_' ) tracer++;
    if ((ident = NewThings(char,strlen(tracer)+1)) == NULL) nomem();
    strcpy(ident,tracer);
    yylval.string = ident;

    return identify(ident,TRUE);
  }
  else {

    /* resolution to an interface, extract the two names from the
     * string (interface, identifer). We insert a '\0' char after
     * interface name (guarranteed at least 2 "spare" chars for the
     * doublecolon) and then find the start of the identifer, and
     * point to it. */

    iname = tracer = string;
    while( isalnum(*tracer) || *tracer == '_' ) tracer++;
    *tracer = '\0';
    while( !isalnum(*tracer) && *tracer != '_' ) tracer++;
    ident = tracer;

    /* Unfortunately, by lexing as {word}{white_sp}*\:\:{white_sp}*{word}
     * has the drawback that we mistakenly gobble a keyword if it
     * appears right in front of an empty-resolved ident as in:
     *
     *   if (...) { ... } else ::ident = 0;
     *
     * (Hopefully rare!) So, we need a keyword check first. Notice
     * that we're assuming ident :: ident can't be ambigous - two idents
     * surrounding a doublecolon must be scope resolution to an interface
     * and not empty resolution preceded by something else. If this 
     * assumption is false, we're in trouble, and have to rethink empty
     * resolution. */

    /* both lexKeyword and lexInsideIspec expect that the ident has
     * malloc'd and copied into the heap, so we need to do that (this is
     * just like calling make_string, but we can't use that call in this
     * case, cause the string has a '::' that we don;t want, and even a
     * second string...) */

    if ((tracer=NewThings(char,strlen(ident)+1)) == NULL) nomem();
    strcpy(tracer,ident);

    if ((token = lexKeyword(iname)) != NOT_A_KEY) {
      
      /* Since the first word was a keyword, we need to put the second
       * part back into the input stream, then return the keyword token */

      tracer = &ident[strlen(ident)];
      tracer--;
      while( tracer >= ident ) {
	unput(*(tracer--));
      }
      unput(':');
      unput(':');

      RETURNIT (token);
    }
    
    /* first word wasn't a key, we have a valid  ident::ident construct */

    if ( ! interface_list_ptr->search(iname,linkptr)) {
      report_error("error 9",
		   " \"%s\" in not a known Interface.\n\tCan't resolve: %s::%s.", 
		   iname, iname, ident);
      exit(1);   /* can't recover */
    }
    else {
      
      /* lookup the ident in the interface, and take the appropriate
       * actions */

      interf = (interface_element *) linkptr;
      token = lexInsideIspec( ident, interf );
      if (token == IDENTIFIER) {
	report_error("error 10",
		     "\"%s\" is scope-resolved to Interface \"%s\",\n\tbut it is neither a Name, type, nor operation there.", 
		     ident, iname);
        exit(1);   /* can't recover */
      }
      else {
	return token;
      }
    }
  }

  /* Added for g++ */
  return (0);
}

int  identify( char *ident, int Cresolve )

     /* This is the HEART OF THE LEXER. Practically every symbol in
      * the program goes through this routine. The second arg is 
      * hardly ever used and defaults to FALSE. It indicates that
      * a C usage is desired, do not return an Elros answer. */

{
  int      token;

  link               *linkptr;
  symbol_element     *entry;
  symbol_element     *symtmp;
  operation_element  *oeptr;
  interface_element  *interf;

  
  symtmp = NULL;

  /*------------------------------------------------------------------*/
  /*                                                                  */
  /*       STEP 1  -  If a symbol is a legimate keyword in the        */
  /*                  current context, we're done - it can't be       */
  /*                  anything else                                   */
  /*                                                                  */
  /*------------------------------------------------------------------*/

  token = lexKeyword(ident);
  if (token != NOT_A_KEY) 
    return token;

  /*------------------------------------------------------------------*/
  /*                                                                  */
  /*       STEP 2  -  In an interface, the only symbols allowed are   */
  /*                  those from the interface                        */
  /*                                                                  */
  /*------------------------------------------------------------------*/

  if (in_interface_spec) {
    if (!ieptr) {
      BUG_CHECK("ieptr is NULL while in_interface_spec is TRUE");
    }
    else {
      return lexInsideIspec(ident,ieptr);
    }
  }
  
  /*------------------------------------------------------------------*/
  /*                                                                  */
  /*       STEP 3  - have we alreay been told what to return ?        */
  /*                                                                  */
  /*------------------------------------------------------------------*/

  switch (IdentMode) {

  case MODE_IDENT:
    {
      IdentMode = MODE_LOOKUP;
      RET(IDENTIFIER);
    }
  case MODE_INSTANCE:
    {
      IdentMode = MODE_LOOKUP;
      entry = Symbol_Table->lookup(ident, 
				   (Cresolve ? SMASK_C : SMASK_INST));
      if (entry == NULL) {
	 report_error("error 11",
		      "\"%s\" is not a declared instance.", 
		      ident);
	 linkptr = NULL;
      }
      else {
	 if (entry->get_kind() == SYM_INST) {
	    if (!instance_list_ptr) {
	       report_error("internal error",
			    "no instances declared - can't find \"%s\".",
			    ident);
	       linkptr = NULL;
	    }
	    if (!instance_list_ptr->search(ident,linkptr)) {
	       report_error("internal error",
			    "\"%s\" is not a declared instance.",
			    ident);
	       linkptr = NULL;
	    }
	 }
      }
    }
    yylval.septr_bufoffset_lptr.lptr = linkptr;
    yylval.septr_bufoffset_lptr.septr = entry;
    prepare_expbuf(ident);
    yylval.septr_bufoffset_lptr.bufoffset = last_bufoffset;
    strcpy(expbuf+last_bufoffset, ident);
    return (INSTANCE_ID);
  case MODE_INTERFACE:
    {
      IdentMode = MODE_LOOKUP;
      if (interface_list_ptr->search(ident,linkptr)) {
	yylval.interface_eptr = (interface_element*)linkptr;
      }
      else {
	report_error("error 14",
		     "No such Interface: \"%s\".",
		     ident);
	yylval.interface_eptr = NULL;
      }
      return 0;
    }
  case MODE_ELROS_TYPE:
    {
      tree_link *tlptr;
      tree_link *tlptr2;
      int duplicate_type = FALSE;

      IdentMode = MODE_LOOKUP;
      if ((entry = Symbol_Table->lookup(ident,SMASK_TYPE)) == NULL) {
	report_error("error 15",
		     "No such type defined: \"%s\".",
		     ident);
	RET(SEMI);
      }

      /* For now, complain if there's multiple definitions, later,
       * we should only complain if there's multiple types */

      if ((tlptr = entry->get_tlptr()) != NULL) {
	if (((symbol_element*)tlptr)->get_kind() == SYM_TYPE)
	   duplicate_type = TRUE;
	for ( ; tlptr2 = tlptr->get_tlptr() ; tlptr = tlptr2) {
	   if (((symbol_element*)tlptr2)->get_kind() == SYM_TYPE)
	      duplicate_type = TRUE;
	}
	if (duplicate_type)
	   report_error("error 16",
			"\"%s\" needs scope resolution.",
			ident);
      }
      interf = entry->get_interf();
      if (interf) {
	if (interf->types_ptr) {
	  if ((interf->types_ptr)->search(ident,linkptr)) {
	    type_element *tep;
	    tep = yylval.teptr_bufoffset.teptr = (type_element*)linkptr;
	    ident = tep->abstr_type_ptr->get_typedef_name();
	    prepare_expbuf(ident);
	    yylval.teptr_bufoffset.bufoffset = last_bufoffset;
	    strcpy(expbuf+last_bufoffset, ident);
	    return TYPE_ID;
	  }
	  else {
	    report_error("internal error",
			 "Type \"%s\" is not in Interface \"%s\".",
			 ident, interf->get_name());
	    RET(SEMI);
	  }
	}
	else {
	  report_error("internal error",
		       "Interface \"%s\" has no types. \"%s\" not found.",
		       interf->get_name(), ident);
	  RET(SEMI);
	}
      }
      else {
	report_error("internal error",
		     "TYPE_ID \"%s\" has no Interface information.", 
		     ident);
	exit(1);
      }
    }

  /*------------------------------------------------------------------*/
  /*                                                                  */
  /*       STEP 4  - look it up in the symbol table                   */
  /*                                                                  */
  /*------------------------------------------------------------------*/

  case MODE_LOOKUP:

    entry = Symbol_Table->lookup(ident, (Cresolve ? SMASK_C : SMASK_ANY));
      
    if (entry == NULL) {

    /* If it's not in the symbol table, it can't be anything but an 
     * identifier. Likely this is either a function with no decl like
     * atoi() or exit(), or an enumeration constant, which aren't in the
     * symbol table. When error recovery time arrives, however, it will
     * probably be best to put everything encountered symbol into the
     * symbol table, so the parser recover/report errors well. */

      RET(IDENTIFIER);
    }
    else {
      switch (entry->get_kind()) {

      case SYM_IDENT:
	{
	  RET(IDENTIFIER);
	}
      case SYM_TYPEDEF:
	{
	  RETURNIT (TYPEDEF_NAME);
	}
      case SYM_INTER:
	{
	  /* at the moment, INTERFACE_NAME tokens are only returned
	   * inside control() and data() decls, and the way this happens
	   * is the IdentMode is set to MODE_INTERFACE to force such a
	   * tokenization. Scope resolution (see scope_resolve(), and the
	   * lex rules that call it) is done lexically, not grammatically
	   * and anywhere else (inside an Roprinti(), for instance) an
	   * interface name appears, it means the C global variable, and is
	   * lexed as IDENTIFER. So, IDENTIFER must be the correct token
	   * if we get to here, and likely we're inside an Roprinti(), or
	   * something similiar */

	  RET(IDENTIFIER);
	}
      case SYM_INST:
	{
	  if (!instance_list_ptr) {
	    report_error("internal error",
			 "No instances declared - can't find \"%s\".",
			 ident);
	    linkptr = NULL;
	  }
	  if (!instance_list_ptr->search(ident,linkptr)) {
	    report_error("internal error",
			 "\"%s\" is not a declared instance.",
			 ident);
	    linkptr = NULL;
	  }
	  yylval.septr_bufoffset_lptr.lptr = linkptr;
	  yylval.septr_bufoffset_lptr.septr = entry;
	  prepare_expbuf(ident);
	  yylval.septr_bufoffset_lptr.bufoffset = last_bufoffset;
	  strcpy(expbuf+last_bufoffset, ident);
	  return (INSTANCE_ID);
	}
      case SYM_TYPE:
	{
	  interf = entry->get_interf();
	  if (interf) {
	    if (interf->types_ptr) {
	      if ((interf->types_ptr)->search(ident,linkptr)) {
      type_element *tep;
		tep = yylval.teptr_bufoffset.teptr = (type_element*)linkptr;
		ident = tep->abstr_type_ptr->get_typedef_name();
	        prepare_expbuf(ident);
		yylval.teptr_bufoffset.bufoffset = last_bufoffset;
	        strcpy(expbuf+last_bufoffset, ident);
		return TYPE_ID;
	      }
	      else {
		report_error("internal error",
			     "Type \"%s\" not in Interface \"%s\".", 
			     ident, interf->get_name());
		RET(SEMI);
	      }
	    }
	    else {
	      report_error("internal error",
			   "Interface \"%s\" has no types. \"%s\" not found.", 
			   interf->get_name(), ident);
	      RET(SEMI);
	    }
	  }
	  else {
	    report_error("internal error",
			 "TYPE_ID \"%s\" has no Interface information.", 
			 ident);
	    exit(1);
	  }
	}
      case SYM_OP:
	{
	  oeptr   = (operation_element*)entry;
	  yylval.operation_eptr = oeptr;
	  return OPERATION_NAME;
	}
      case SYM_NAME:
	{
	  yylval.name_eptr = (name_element*)entry;
	  return PARAMETER_NAME;
	}
      case SYM_UNKNOWN:
	{
	  BUG_CHECK("found SYM_UNKNOWN in identify()");
	}
      }
    }
  default:
    report_error("internal error",
		 "Bad IdentMode: %d.",
		 IdentMode);
    exit(1);
  }
  BUG_CHECK("fell through the bottom of identify()");
  return(0); /* keep compilers happy */
}

void prepare_expbuf(char* arg)
{									
   int newlen;							
   newlen = strlen(arg)+1+EXTRA_CHARS;			
   if (expbuf) {
      last_bufoffset = strlen(expbuf);		
      if ((last_bufoffset+newlen) > max_bufsize) {
	 max_bufsize += ((max_bufsize > (last_bufoffset+newlen))
			 ? max_bufsize
			 : (last_bufoffset+newlen)); 
	 if ((expbuf = (char*)realloc(expbuf,max_bufsize)) == NULL) nomem();		      }
   }
   else {
      last_bufoffset = 0;		
      if ((expbuf = (char*)malloc(INIT_EXPBUF_SIZE)) == NULL) nomem();
      max_bufsize = INIT_EXPBUF_SIZE;  
   }
}

int yyvstop[] = {
0,

79,
0,

78,
0,

14,
79,
0,

79,
0,

79,
0,

20,
79,
0,

13,
79,
0,

79,
0,

1,
79,
0,

2,
79,
0,

18,
79,
0,

17,
79,
0,

9,
79,
0,

16,
79,
0,

12,
79,
0,

19,
79,
0,

48,
49,
79,
0,

48,
49,
79,
0,

47,
79,
0,

10,
79,
0,

5,
79,
0,

11,
79,
0,

6,
79,
0,

23,
79,
0,

76,
79,
0,

76,
79,
0,

76,
79,
0,

76,
79,
0,

76,
79,
0,

76,
79,
0,

76,
79,
0,

76,
79,
0,

76,
79,
0,

76,
79,
0,

76,
79,
0,

76,
79,
0,

76,
79,
0,

76,
79,
0,

76,
79,
0,

7,
79,
0,

8,
79,
0,

21,
79,
0,

48,
49,
76,
79,
0,

3,
79,
0,

22,
79,
0,

4,
79,
0,

15,
79,
0,

76,
79,
0,

76,
79,
0,

45,
0,

77,
0,

75,
0,

31,
0,

40,
0,

32,
0,

29,
0,

37,
0,

27,
0,

38,
0,

28,
0,

39,
0,

50,
0,

30,
0,

50,
0,

48,
49,
0,

49,
0,

36,
0,

42,
0,

44,
0,

46,
0,

43,
0,

35,
0,

76,
0,

72,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

33,
0,

48,
49,
76,
0,

76,
0,

49,
76,
0,

34,
0,

41,
0,

76,
0,

76,
0,

77,
0,

53,
0,

24,
0,

50,
0,

50,
52,
0,

50,
0,

51,
0,

74,
0,

26,
0,

25,
0,

71,
0,

68,
76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

50,
76,
0,

76,
0,

76,
0,

50,
0,

50,
0,

50,
0,

51,
0,

73,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

67,
76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

50,
76,
0,

50,
76,
0,

76,
0,

54,
76,
0,

50,
0,

52,
0,

50,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

70,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

61,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

69,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

63,
0,

76,
0,

76,
0,

76,
0,

65,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

66,
0,

76,
0,

76,
0,

76,
0,

76,
0,

62,
0,

55,
0,

76,
0,

76,
0,

76,
0,

76,
0,

76,
0,

58,
0,

60,
0,

76,
0,

76,
0,

76,
0,

59,
0,

76,
0,

76,
0,

76,
0,

56,
0,

57,
0,

64,
0,
0};
# define YYTYPE int
struct yywork { YYTYPE verify, advance; } yycrank[] = {
0,0,	0,0,	1,5,	0,0,	
0,0,	0,0,	0,0,	0,0,	
0,0,	0,0,	1,5,	1,6,	
0,0,	0,0,	0,0,	0,0,	
0,0,	0,0,	0,0,	0,0,	
0,0,	0,0,	0,0,	0,0,	
0,0,	0,0,	0,0,	0,0,	
0,0,	0,0,	0,0,	0,0,	
0,0,	0,0,	1,7,	1,8,	
1,9,	0,0,	1,10,	1,11,	
1,12,	1,13,	1,14,	1,15,	
1,16,	1,17,	1,18,	1,19,	
1,20,	1,21,	1,22,	1,22,	
1,22,	1,22,	1,22,	1,22,	
1,22,	1,22,	1,22,	1,23,	
1,24,	1,25,	1,26,	1,27,	
1,28,	1,5,	1,29,	1,30,	
1,31,	1,32,	1,33,	1,34,	
1,35,	1,34,	1,36,	1,34,	
1,34,	1,37,	1,34,	1,38,	
1,39,	1,40,	1,34,	1,41,	
1,34,	1,42,	1,34,	1,43,	
1,34,	1,34,	1,34,	1,34,	
1,44,	1,5,	1,45,	1,46,	
1,47,	7,54,	1,34,	1,34,	
1,34,	1,34,	1,34,	1,34,	
1,34,	1,34,	1,34,	1,34,	
1,34,	1,34,	1,34,	1,34,	
1,34,	1,34,	1,34,	1,34,	
1,34,	1,34,	1,34,	1,34,	
1,34,	10,60,	1,34,	1,34,	
1,48,	1,49,	1,50,	1,51,	
2,7,	15,65,	2,9,	20,74,	
2,10,	2,11,	23,80,	2,13,	
2,14,	2,15,	33,96,	2,17,	
2,18,	2,19,	2,20,	11,61,	
2,22,	2,22,	2,22,	2,22,	
2,22,	2,22,	2,22,	2,22,	
2,22,	2,23,	2,24,	2,25,	
2,26,	2,27,	2,28,	25,81,	
25,82,	2,30,	2,31,	2,32,	
34,88,	2,34,	11,62,	2,34,	
2,36,	2,34,	2,34,	2,37,	
2,34,	2,38,	2,39,	2,40,	
2,34,	2,41,	2,34,	2,42,	
2,34,	2,43,	2,34,	46,110,	
2,34,	2,34,	2,44,	2,5,	
2,45,	2,46,	26,83,	26,84,	
2,34,	2,34,	2,34,	2,34,	
2,34,	2,34,	2,34,	2,34,	
2,34,	2,34,	2,34,	2,34,	
2,34,	2,34,	2,34,	2,34,	
2,34,	2,34,	2,34,	2,34,	
2,34,	2,34,	2,34,	32,95,	
2,34,	2,34,	2,48,	2,49,	
2,50,	2,51,	3,7,	71,120,	
3,9,	81,129,	3,10,	3,11,	
32,88,	3,13,	3,14,	3,15,	
36,99,	3,17,	3,18,	3,19,	
3,20,	18,68,	3,22,	3,22,	
3,22,	3,22,	3,22,	3,22,	
3,22,	3,22,	3,22,	3,23,	
3,24,	3,25,	3,26,	3,27,	
3,28,	18,69,	18,70,	3,30,	
3,31,	3,32,	86,130,	3,52,	
37,101,	3,34,	3,36,	3,34,	
3,34,	3,37,	3,34,	3,38,	
3,39,	3,40,	3,34,	3,41,	
3,34,	3,53,	3,34,	3,43,	
3,34,	36,100,	3,34,	3,34,	
3,44,	3,5,	3,45,	3,46,	
27,85,	27,86,	3,34,	3,34,	
3,34,	3,34,	3,34,	3,34,	
3,34,	3,34,	3,34,	3,34,	
3,34,	3,34,	3,34,	3,34,	
3,34,	3,34,	3,34,	3,34,	
3,34,	3,34,	3,34,	3,34,	
3,34,	88,88,	3,34,	3,34,	
3,48,	3,49,	3,50,	3,51,	
4,7,	43,109,	4,9,	38,88,	
4,10,	4,11,	43,88,	4,13,	
4,14,	4,15,	38,102,	4,17,	
4,18,	4,19,	4,20,	37,88,	
4,22,	4,22,	4,22,	4,22,	
4,22,	4,22,	4,22,	4,22,	
4,22,	4,23,	4,24,	4,25,	
4,26,	4,27,	4,28,	31,88,	
31,94,	4,30,	4,31,	4,32,	
89,131,	4,52,	49,114,	4,34,	
4,36,	4,34,	4,34,	4,37,	
4,34,	4,38,	4,39,	4,40,	
4,34,	4,41,	4,34,	4,53,	
4,34,	4,43,	4,34,	94,136,	
4,34,	4,34,	4,44,	4,5,	
4,45,	4,46,	93,88,	93,135,	
4,34,	4,34,	4,34,	4,34,	
4,34,	4,34,	4,34,	4,34,	
4,34,	4,34,	4,34,	4,34,	
4,34,	4,34,	4,34,	4,34,	
4,34,	4,34,	4,34,	4,34,	
4,34,	4,34,	4,34,	8,55,	
4,34,	4,34,	4,48,	4,49,	
4,50,	4,51,	16,66,	8,55,	
8,0,	9,58,	30,92,	41,107,	
35,97,	49,115,	97,139,	30,88,	
30,93,	9,58,	9,59,	12,63,	
41,88,	35,88,	39,103,	39,104,	
16,67,	35,98,	40,88,	12,63,	
12,63,	42,108,	40,106,	52,116,	
8,56,	96,88,	39,105,	63,119,	
53,108,	8,55,	42,88,	78,78,	
96,138,	8,55,	9,58,	55,0,	
52,88,	53,88,	8,55,	9,58,	
78,78,	53,117,	99,141,	9,58,	
12,63,	91,88,	57,55,	101,0,	
9,58,	12,0,	108,150,	92,88,	
108,88,	12,63,	8,55,	8,55,	
91,133,	92,134,	12,63,	8,55,	
95,88,	8,55,	100,88,	78,78,	
9,58,	9,58,	95,137,	118,0,	
100,142,	9,58,	57,118,	9,58,	
78,78,	98,140,	12,63,	12,63,	
133,88,	117,88,	8,55,	12,63,	
63,64,	12,63,	8,57,	103,145,	
117,155,	8,55,	98,88,	103,88,	
9,58,	102,143,	102,144,	102,88,	
116,154,	148,184,	116,88,	9,58,	
106,148,	104,88,	12,63,	99,88,	
101,64,	106,88,	12,64,	104,146,	
19,71,	12,63,	19,72,	19,72,	
19,72,	19,72,	19,72,	19,72,	
19,72,	19,72,	19,72,	19,72,	
21,75,	55,57,	21,76,	21,76,	
21,76,	21,76,	21,76,	21,76,	
21,76,	21,76,	21,76,	21,76,	
57,57,	73,72,	73,72,	73,72,	
73,72,	73,72,	73,72,	73,72,	
73,72,	73,72,	73,72,	21,77,	
105,147,	105,147,	127,162,	113,113,	
109,151,	134,164,	21,78,	107,149,	
135,165,	118,57,	135,88,	127,162,	
113,113,	19,73,	109,88,	21,78,	
87,87,	87,87,	21,79,	109,152,	
107,88,	136,88,	166,88,	105,147,	
139,169,	21,76,	166,198,	136,166,	
137,167,	138,168,	138,88,	21,77,	
134,88,	139,88,	127,162,	113,113,	
73,73,	113,88,	21,78,	87,87,	
140,88,	137,88,	140,170,	127,162,	
113,113,	173,88,	141,171,	21,78,	
177,209,	22,75,	21,79,	22,76,	
22,76,	22,76,	22,76,	22,76,	
22,76,	22,76,	22,76,	22,76,	
22,76,	126,122,	143,173,	178,210,	
143,88,	87,89,	142,172,	126,161,	
144,174,	145,175,	169,88,	87,90,	
22,77,	141,88,	169,202,	142,88,	
126,161,	144,88,	145,88,	22,78,	
146,176,	150,186,	29,87,	29,87,	
149,185,	151,187,	149,88,	152,188,	
22,78,	146,88,	150,88,	154,88,	
152,88,	126,122,	151,88,	172,205,	
154,191,	155,192,	22,76,	126,161,	
179,211,	105,88,	172,88,	164,88,	
22,77,	29,87,	155,88,	165,197,	
126,161,	164,196,	168,201,	22,78,	
170,203,	174,88,	180,212,	181,213,	
165,88,	174,206,	170,88,	168,88,	
22,78,	29,88,	29,88,	29,88,	
29,88,	29,88,	29,88,	29,88,	
29,88,	29,88,	29,88,	29,89,	
182,214,	183,215,	187,88,	187,220,	
189,88,	29,90,	29,88,	29,88,	
29,88,	29,88,	29,88,	29,88,	
29,88,	29,88,	29,88,	29,88,	
29,88,	29,88,	29,88,	29,88,	
29,88,	29,88,	29,88,	29,88,	
29,88,	29,88,	29,88,	29,88,	
29,88,	29,88,	29,88,	29,88,	
192,88,	194,158,	198,88,	198,224,	
29,88,	209,235,	29,88,	29,88,	
29,88,	29,88,	29,88,	29,88,	
29,88,	29,88,	29,88,	29,88,	
29,88,	29,88,	29,88,	29,91,	
29,88,	29,88,	29,88,	29,88,	
29,88,	29,88,	29,88,	29,88,	
29,88,	29,88,	29,88,	29,88,	
47,75,	188,221,	47,111,	47,111,	
47,111,	47,111,	47,111,	47,111,	
47,111,	47,111,	47,111,	47,111,	
64,63,	188,88,	196,88,	162,162,	
171,88,	175,207,	196,222,	157,122,	
64,63,	64,0,	171,204,	47,112,	
162,162,	157,193,	176,88,	184,88,	
175,88,	186,88,	47,113,	160,122,	
176,208,	184,216,	157,193,	186,219,	
203,229,	160,195,	201,88,	47,113,	
197,223,	203,88,	201,227,	191,192,	
204,88,	64,63,	160,195,	162,162,	
204,230,	47,111,	64,63,	157,122,	
191,88,	197,88,	64,63,	47,112,	
162,162,	157,193,	205,231,	64,63,	
202,228,	193,193,	47,113,	160,122,	
47,88,	210,236,	157,193,	205,88,	
207,88,	160,195,	193,193,	47,113,	
206,232,	202,88,	207,233,	64,63,	
64,63,	206,88,	160,195,	211,237,	
64,63,	208,234,	64,63,	72,72,	
72,72,	72,72,	72,72,	72,72,	
72,72,	72,72,	72,72,	72,72,	
72,72,	193,193,	195,195,	212,238,	
213,239,	214,240,	215,241,	64,63,	
167,199,	167,199,	193,193,	195,195,	
72,121,	72,122,	64,63,	223,248,	
208,88,	185,217,	185,217,	72,122,	
75,123,	75,123,	75,123,	75,123,	
75,123,	75,123,	75,123,	75,123,	
75,123,	75,123,	220,88,	167,199,	
235,258,	216,242,	195,195,	221,246,	
220,245,	221,88,	72,72,	167,200,	
185,217,	75,124,	236,259,	195,195,	
72,121,	72,122,	216,88,	77,125,	
185,218,	77,125,	237,260,	72,122,	
77,126,	77,126,	77,126,	77,126,	
77,126,	77,126,	77,126,	77,126,	
77,126,	77,126,	219,244,	222,247,	
224,249,	231,88,	224,88,	75,123,	
222,88,	231,248,	228,252,	219,88,	
228,88,	75,124,	79,127,	79,127,	
79,127,	79,127,	79,127,	79,127,	
79,127,	79,127,	79,127,	79,127,	
80,80,	80,80,	229,253,	227,251,	
199,199,	199,199,	232,255,	79,127,	
79,127,	79,127,	79,127,	79,127,	
79,127,	229,88,	230,254,	77,126,	
227,88,	232,88,	233,256,	230,88,	
234,88,	238,261,	239,262,	80,80,	
240,263,	167,88,	234,257,	199,199,	
241,264,	245,269,	247,271,	254,279,	
258,283,	242,265,	185,88,	199,200,	
244,88,	79,127,	245,88,	79,127,	
79,127,	79,127,	79,127,	79,127,	
79,127,	242,88,	244,268,	251,88,	
257,88,	259,284,	261,285,	262,286,	
257,282,	251,276,	263,287,	233,88,	
80,128,	80,128,	80,128,	80,128,	
80,128,	80,128,	80,128,	80,128,	
80,128,	80,128,	80,128,	80,128,	
80,128,	80,128,	80,128,	80,128,	
80,128,	80,128,	80,128,	80,128,	
80,128,	80,128,	80,128,	80,128,	
80,128,	80,128,	264,288,	265,289,	
283,304,	265,88,	80,128,	284,305,	
80,128,	80,128,	80,128,	80,128,	
80,128,	80,128,	80,128,	80,128,	
80,128,	80,128,	80,128,	80,128,	
80,128,	80,128,	80,128,	80,128,	
80,128,	80,128,	80,128,	80,128,	
80,128,	80,128,	80,128,	80,128,	
80,128,	80,128,	90,90,	90,90,	
121,156,	285,306,	121,156,	286,307,	
252,277,	121,157,	121,157,	121,157,	
121,157,	121,157,	121,157,	121,157,	
121,157,	121,157,	121,157,	246,270,	
253,278,	255,280,	271,294,	256,281,	
268,291,	90,90,	217,217,	217,217,	
246,88,	271,88,	277,88,	287,308,	
124,159,	256,88,	124,159,	252,88,	
277,299,	124,160,	124,160,	124,160,	
124,160,	124,160,	124,160,	124,160,	
124,160,	124,160,	124,160,	253,88,	
255,88,	217,217,	282,303,	268,88,	
288,309,	302,324,	303,325,	282,88,	
121,157,	217,218,	90,132,	90,132,	
90,132,	90,132,	90,132,	90,132,	
90,132,	90,132,	90,132,	90,132,	
90,132,	90,132,	90,132,	90,132,	
90,132,	90,132,	90,132,	90,132,	
90,132,	90,132,	90,132,	90,132,	
90,132,	90,132,	90,132,	90,132,	
124,160,	299,88,	304,326,	305,327,	
90,132,	299,321,	90,132,	90,132,	
90,132,	90,132,	90,132,	90,132,	
90,132,	90,132,	90,132,	90,132,	
90,132,	90,132,	90,132,	90,132,	
90,132,	90,132,	90,132,	90,132,	
90,132,	90,132,	90,132,	90,132,	
90,132,	90,132,	90,132,	90,132,	
111,75,	306,328,	111,111,	111,111,	
111,111,	111,111,	111,111,	111,111,	
111,111,	111,111,	111,111,	111,111,	
125,126,	125,126,	125,126,	125,126,	
125,126,	125,126,	125,126,	125,126,	
125,126,	125,126,	161,122,	111,112,	
270,293,	250,250,	250,250,	307,329,	
161,161,	276,298,	111,113,	269,88,	
298,248,	243,266,	243,266,	266,266,	
266,266,	161,161,	276,88,	111,113,	
278,88,	269,292,	298,88,	279,294,	
308,330,	309,331,	278,300,	280,88,	
250,250,	111,111,	279,88,	270,88,	
281,302,	280,301,	161,122,	111,112,	
243,266,	250,225,	266,266,	125,126,	
161,161,	281,88,	111,113,	300,88,	
111,88,	326,342,	327,343,	300,322,	
243,267,	161,161,	266,267,	111,113,	
112,0,	112,0,	112,0,	112,0,	
112,0,	112,0,	112,0,	112,0,	
112,87,	112,87,	112,0,	112,0,	
112,0,	112,0,	112,0,	112,0,	
112,0,	112,0,	112,0,	112,0,	
112,0,	112,0,	112,0,	112,0,	
112,0,	112,0,	112,0,	112,0,	
112,0,	112,0,	112,0,	328,344,	
112,0,	112,0,	112,0,	112,0,	
112,0,	112,0,	112,0,	112,0,	
112,0,	112,0,	112,125,	112,0,	
289,310,	112,0,	112,0,	112,153,	
291,88,	329,345,	293,88,	330,346,	
331,347,	289,88,	291,313,	292,314,	
293,315,	112,89,	112,0,	112,0,	
112,0,	112,0,	112,0,	112,90,	
112,88,	301,88,	272,272,	272,272,	
112,88,	301,323,	112,88,	156,157,	
156,157,	156,157,	156,157,	156,157,	
156,157,	156,157,	156,157,	156,157,	
156,157,	338,353,	292,88,	310,332,	
313,88,	274,274,	274,274,	112,88,	
313,333,	272,272,	112,0,	112,0,	
112,0,	112,0,	112,153,	112,0,	
123,158,	272,273,	123,123,	123,123,	
123,123,	123,123,	123,123,	123,123,	
123,123,	123,123,	123,123,	123,123,	
274,274,	314,88,	310,88,	339,354,	
340,355,	315,88,	324,88,	314,334,	
274,275,	315,335,	156,157,	123,124,	
324,341,	342,357,	112,0,	112,0,	
112,0,	112,0,	112,0,	321,338,	
322,339,	323,340,	343,358,	344,359,	
321,88,	322,88,	323,88,	128,128,	
128,128,	128,128,	128,128,	128,128,	
128,128,	128,128,	128,128,	128,128,	
128,128,	123,123,	334,88,	346,362,	
347,363,	349,365,	334,350,	123,124,	
128,128,	128,128,	128,128,	128,128,	
128,128,	128,128,	128,128,	128,128,	
128,128,	128,128,	128,128,	128,128,	
128,128,	128,128,	128,128,	128,128,	
128,128,	128,128,	128,128,	128,128,	
128,128,	128,128,	128,128,	128,128,	
128,128,	128,128,	333,349,	351,367,	
359,369,	360,370,	128,128,	333,88,	
128,128,	128,128,	128,128,	128,128,	
128,128,	128,128,	128,128,	128,128,	
128,128,	128,128,	128,128,	128,128,	
128,128,	128,128,	128,128,	128,128,	
128,128,	128,128,	128,128,	128,128,	
128,128,	128,128,	128,128,	128,128,	
128,128,	128,128,	131,131,	131,131,	
158,194,	158,194,	158,194,	158,194,	
158,194,	158,194,	158,194,	158,194,	
158,194,	158,194,	325,294,	335,351,	
332,88,	345,360,	341,356,	361,371,	
335,88,	325,88,	332,348,	341,88,	
348,88,	131,131,	248,272,	248,272,	
348,364,	350,366,	362,372,	345,361,	
363,373,	366,375,	350,88,	369,377,	
370,378,	159,160,	159,160,	159,160,	
159,160,	159,160,	159,160,	159,160,	
159,160,	159,160,	159,160,	353,294,	
354,294,	248,272,	373,379,	158,194,	
374,380,	377,382,	353,88,	354,88,	
379,383,	248,273,	131,163,	131,163,	
131,163,	131,163,	131,163,	131,163,	
131,163,	131,163,	131,163,	131,163,	
131,163,	131,163,	131,163,	131,163,	
131,163,	131,163,	131,163,	131,163,	
131,163,	131,163,	131,163,	131,163,	
131,163,	131,163,	131,163,	131,163,	
159,160,	381,88,	382,385,	383,386,	
131,163,	381,384,	131,163,	131,163,	
131,163,	131,163,	131,163,	131,163,	
131,163,	131,163,	131,163,	131,163,	
131,163,	131,163,	131,163,	131,163,	
131,163,	131,163,	131,163,	131,163,	
131,163,	131,163,	131,163,	131,163,	
131,163,	131,163,	131,163,	131,163,	
132,132,	132,132,	132,132,	132,132,	
132,132,	132,132,	132,132,	132,132,	
132,132,	132,132,	364,374,	248,88,	
385,389,	386,390,	0,0,	364,88,	
0,0,	132,132,	132,132,	132,132,	
132,132,	132,132,	132,132,	132,132,	
132,132,	132,132,	132,132,	132,132,	
132,132,	132,132,	132,132,	132,132,	
132,132,	132,132,	132,132,	132,132,	
132,132,	132,132,	132,132,	132,132,	
132,132,	132,132,	132,132,	368,376,	
0,0,	0,0,	0,0,	132,132,	
368,88,	132,132,	132,132,	132,132,	
132,132,	132,132,	132,132,	132,132,	
132,132,	132,132,	132,132,	132,132,	
132,132,	132,132,	132,132,	132,132,	
132,132,	132,132,	132,132,	132,132,	
132,132,	132,132,	132,132,	132,132,	
132,132,	132,132,	132,132,	147,147,	
147,147,	355,294,	376,381,	290,311,	
290,311,	295,318,	295,318,	0,0,	
355,88,	311,311,	311,311,	376,88,	
153,153,	153,153,	153,153,	153,153,	
153,153,	153,153,	153,153,	153,153,	
153,153,	153,153,	147,147,	356,368,	
249,274,	249,274,	290,311,	0,0,	
295,318,	294,316,	294,316,	356,88,	
311,311,	0,0,	153,189,	290,312,	
365,294,	295,319,	316,316,	316,316,	
153,190,	311,312,	0,0,	365,88,	
367,294,	0,0,	375,294,	249,274,	
147,89,	153,190,	0,0,	367,88,	
294,316,	375,88,	147,90,	249,275,	
147,177,	147,178,	147,179,	153,153,	
294,317,	316,316,	0,0,	147,180,	
380,294,	0,0,	153,189,	147,181,	
147,182,	316,317,	147,183,	380,88,	
153,190,	0,0,	153,88,	0,0,	
0,0,	0,0,	0,0,	0,0,	
0,0,	153,190,	163,163,	163,163,	
163,163,	163,163,	163,163,	163,163,	
163,163,	163,163,	163,163,	163,163,	
0,0,	0,0,	0,0,	0,0,	
0,0,	0,0,	0,0,	163,163,	
163,163,	163,163,	163,163,	163,163,	
163,163,	163,163,	163,163,	163,163,	
163,163,	163,163,	163,163,	163,163,	
163,163,	163,163,	163,163,	163,163,	
163,163,	163,163,	163,163,	163,163,	
163,163,	163,163,	163,163,	163,163,	
163,163,	249,88,	0,0,	0,0,	
0,0,	163,163,	294,88,	163,163,	
163,163,	163,163,	163,163,	163,163,	
163,163,	163,163,	163,163,	163,163,	
163,163,	163,163,	163,163,	163,163,	
163,163,	163,163,	163,163,	163,163,	
163,163,	163,163,	163,163,	163,163,	
163,163,	163,163,	163,163,	163,163,	
163,163,	190,189,	200,200,	200,200,	
318,318,	318,318,	0,0,	190,190,	
320,320,	320,320,	0,0,	0,0,	
336,336,	336,336,	387,387,	387,387,	
190,190,	0,0,	0,0,	384,387,	
384,387,	0,0,	0,0,	394,395,	
394,395,	200,200,	0,0,	318,318,	
0,0,	0,0,	0,0,	320,320,	
0,0,	190,189,	200,225,	336,336,	
318,319,	387,387,	0,0,	190,190,	
320,296,	190,88,	384,387,	0,0,	
336,352,	387,388,	394,395,	0,0,	
190,190,	0,0,	384,388,	0,0,	
0,0,	0,0,	0,0,	394,396,	
0,0,	0,0,	200,226,	200,226,	
200,226,	200,226,	200,226,	200,226,	
200,226,	200,226,	200,226,	200,226,	
200,226,	200,226,	200,226,	200,226,	
200,226,	200,226,	200,226,	200,226,	
200,226,	200,226,	200,226,	200,226,	
200,226,	200,226,	200,226,	200,226,	
0,0,	0,0,	0,0,	0,0,	
200,226,	0,0,	200,226,	200,226,	
200,226,	200,226,	200,226,	200,226,	
200,226,	200,226,	200,226,	200,226,	
200,226,	200,226,	200,226,	200,226,	
200,226,	200,226,	200,226,	200,226,	
200,226,	200,226,	200,226,	200,226,	
200,226,	200,226,	200,226,	200,226,	
218,218,	218,218,	395,395,	395,395,	
384,88,	0,0,	0,0,	0,0,	
0,0,	0,0,	226,250,	226,250,	
0,0,	0,0,	0,0,	0,0,	
0,0,	0,0,	0,0,	0,0,	
0,0,	0,0,	0,0,	218,218,	
0,0,	395,395,	0,0,	0,0,	
0,0,	0,0,	0,0,	0,0,	
0,0,	226,250,	395,396,	0,0,	
267,267,	267,267,	0,0,	218,243,	
218,243,	218,243,	218,243,	218,243,	
218,243,	218,243,	218,243,	218,243,	
218,243,	226,226,	226,226,	226,226,	
226,226,	226,226,	226,226,	226,226,	
226,226,	226,226,	226,226,	267,267,	
0,0,	0,0,	273,273,	273,273,	
391,391,	391,391,	0,0,	0,0,	
0,0,	0,0,	0,0,	0,0,	
0,0,	0,0,	0,0,	267,290,	
267,290,	267,290,	267,290,	267,290,	
267,290,	267,290,	267,290,	267,290,	
267,290,	273,273,	218,243,	391,391,	
297,320,	297,320,	0,0,	0,0,	
0,0,	275,275,	275,275,	0,0,	
0,0,	0,0,	0,0,	391,393,	
0,0,	273,295,	273,295,	273,295,	
273,295,	273,295,	273,295,	273,295,	
273,295,	273,295,	273,295,	297,320,	
0,0,	0,0,	0,0,	0,0,	
275,275,	0,0,	0,0,	0,0,	
0,0,	0,0,	267,290,	0,0,	
0,0,	275,296,	0,0,	297,297,	
297,297,	297,297,	297,297,	297,297,	
297,297,	297,297,	297,297,	297,297,	
297,297,	0,0,	0,0,	0,0,	
0,0,	0,0,	0,0,	0,0,	
0,0,	0,0,	0,0,	0,0,	
273,295,	275,297,	275,297,	275,297,	
275,297,	275,297,	275,297,	275,297,	
275,297,	275,297,	275,297,	275,297,	
275,297,	275,297,	275,297,	275,297,	
275,297,	275,297,	275,297,	275,297,	
275,297,	275,297,	275,297,	275,297,	
275,297,	275,297,	275,297,	0,0,	
0,0,	0,0,	0,0,	275,297,	
0,0,	275,297,	275,297,	275,297,	
275,297,	275,297,	275,297,	275,297,	
275,297,	275,297,	275,297,	275,297,	
275,297,	275,297,	275,297,	275,297,	
275,297,	275,297,	275,297,	275,297,	
275,297,	275,297,	275,297,	275,297,	
275,297,	275,297,	275,297,	317,317,	
317,317,	0,0,	0,0,	0,0,	
0,0,	0,0,	0,0,	0,0,	
0,0,	0,0,	0,0,	0,0,	
0,0,	0,0,	0,0,	0,0,	
0,0,	0,0,	0,0,	0,0,	
0,0,	0,0,	317,317,	0,0,	
0,0,	337,336,	337,336,	0,0,	
0,0,	0,0,	0,0,	0,0,	
317,336,	0,0,	0,0,	0,0,	
0,0,	0,0,	317,337,	317,337,	
317,337,	317,337,	317,337,	317,337,	
317,337,	317,337,	317,337,	317,337,	
337,336,	0,0,	0,0,	388,388,	
388,388,	0,0,	0,0,	0,0,	
0,0,	337,352,	0,0,	0,0,	
0,0,	0,0,	0,0,	0,0,	
337,337,	337,337,	337,337,	337,337,	
337,337,	337,337,	337,337,	337,337,	
337,337,	337,337,	388,388,	0,0,	
0,0,	392,391,	392,391,	0,0,	
0,0,	0,0,	0,0,	0,0,	
388,391,	317,337,	0,0,	393,393,	
393,393,	0,0,	388,392,	388,392,	
388,392,	388,392,	388,392,	388,392,	
388,392,	388,392,	388,392,	388,392,	
392,391,	0,0,	0,0,	0,0,	
0,0,	0,0,	0,0,	0,0,	
0,0,	0,0,	393,393,	337,337,	
392,393,	0,0,	0,0,	0,0,	
392,392,	392,392,	392,392,	392,392,	
392,392,	392,392,	392,392,	392,392,	
392,392,	392,392,	393,394,	393,394,	
393,394,	393,394,	393,394,	393,394,	
393,394,	393,394,	393,394,	393,394,	
0,0,	388,392,	0,0,	0,0,	
0,0,	0,0,	0,0,	0,0,	
0,0,	0,0,	0,0,	0,0,	
0,0,	0,0,	0,0,	0,0,	
0,0,	0,0,	0,0,	0,0,	
0,0,	0,0,	0,0,	0,0,	
0,0,	0,0,	0,0,	392,392,	
0,0,	0,0,	0,0,	0,0,	
0,0,	0,0,	0,0,	0,0,	
0,0,	393,394,	0,0,	0,0,	
0,0};
struct yysvf yysvec[] = {
0,	0,	0,
yycrank+-1,	0,		0,	
yycrank+-95,	yysvec+1,	0,	
yycrank+-189,	yysvec+1,	0,	
yycrank+-283,	yysvec+1,	0,	
yycrank+0,	0,		yyvstop+1,
yycrank+0,	0,		yyvstop+3,
yycrank+36,	0,		yyvstop+5,
yycrank+-402,	0,		yyvstop+8,
yycrank+-412,	0,		yyvstop+10,
yycrank+60,	0,		yyvstop+12,
yycrank+105,	0,		yyvstop+15,
yycrank+-422,	0,		yyvstop+18,
yycrank+0,	0,		yyvstop+20,
yycrank+0,	0,		yyvstop+23,
yycrank+68,	0,		yyvstop+26,
yycrank+367,	0,		yyvstop+29,
yycrank+0,	0,		yyvstop+32,
yycrank+192,	0,		yyvstop+35,
yycrank+470,	0,		yyvstop+38,
yycrank+70,	0,		yyvstop+41,
yycrank+482,	0,		yyvstop+44,
yycrank+555,	0,		yyvstop+48,
yycrank+76,	0,		yyvstop+52,
yycrank+0,	0,		yyvstop+55,
yycrank+99,	0,		yyvstop+58,
yycrank+129,	0,		yyvstop+61,
yycrank+223,	0,		yyvstop+64,
yycrank+0,	0,		yyvstop+67,
yycrank+625,	0,		yyvstop+70,
yycrank+309,	yysvec+29,	yyvstop+73,
yycrank+237,	yysvec+29,	yyvstop+76,
yycrank+118,	yysvec+29,	yyvstop+79,
yycrank+28,	yysvec+29,	yyvstop+82,
yycrank+54,	yysvec+29,	yyvstop+85,
yycrank+315,	yysvec+29,	yyvstop+88,
yycrank+167,	yysvec+29,	yyvstop+91,
yycrank+221,	yysvec+29,	yyvstop+94,
yycrank+209,	yysvec+29,	yyvstop+97,
yycrank+328,	yysvec+29,	yyvstop+100,
yycrank+320,	yysvec+29,	yyvstop+103,
yycrank+314,	yysvec+29,	yyvstop+106,
yycrank+332,	yysvec+29,	yyvstop+109,
yycrank+212,	yysvec+29,	yyvstop+112,
yycrank+0,	0,		yyvstop+115,
yycrank+0,	0,		yyvstop+118,
yycrank+122,	0,		yyvstop+121,
yycrank+702,	yysvec+29,	yyvstop+124,
yycrank+0,	0,		yyvstop+129,
yycrank+293,	0,		yyvstop+132,
yycrank+0,	0,		yyvstop+135,
yycrank+0,	0,		yyvstop+138,
yycrank+338,	yysvec+29,	yyvstop+141,
yycrank+339,	yysvec+29,	yyvstop+144,
yycrank+0,	0,		yyvstop+147,
yycrank+-437,	yysvec+8,	0,	
yycrank+0,	0,		yyvstop+149,
yycrank+-448,	yysvec+8,	0,	
yycrank+0,	yysvec+9,	0,	
yycrank+0,	0,		yyvstop+151,
yycrank+0,	0,		yyvstop+153,
yycrank+0,	0,		yyvstop+155,
yycrank+0,	0,		yyvstop+157,
yycrank+-400,	yysvec+12,	0,	
yycrank+-759,	0,		0,	
yycrank+0,	0,		yyvstop+159,
yycrank+0,	0,		yyvstop+161,
yycrank+0,	0,		yyvstop+163,
yycrank+0,	0,		yyvstop+165,
yycrank+0,	0,		yyvstop+167,
yycrank+0,	0,		yyvstop+169,
yycrank+177,	0,		0,	
yycrank+783,	0,		yyvstop+171,
yycrank+493,	0,		0,	
yycrank+0,	0,		yyvstop+173,
yycrank+812,	yysvec+72,	yyvstop+175,
yycrank+0,	yysvec+22,	yyvstop+177,
yycrank+844,	0,		0,	
yycrank+367,	0,		yyvstop+180,
yycrank+866,	0,		0,	
yycrank+915,	0,		0,	
yycrank+164,	0,		yyvstop+182,
yycrank+0,	0,		yyvstop+184,
yycrank+0,	0,		yyvstop+186,
yycrank+0,	0,		yyvstop+188,
yycrank+0,	0,		yyvstop+190,
yycrank+197,	0,		yyvstop+192,
yycrank+559,	0,		0,	
yycrank+199,	yysvec+29,	yyvstop+194,
yycrank+294,	0,		yyvstop+196,
yycrank+1029,	0,		0,	
yycrank+347,	yysvec+29,	yyvstop+198,
yycrank+353,	yysvec+29,	yyvstop+200,
yycrank+268,	yysvec+29,	yyvstop+202,
yycrank+261,	yysvec+29,	yyvstop+204,
yycrank+362,	yysvec+29,	yyvstop+206,
yycrank+327,	yysvec+29,	yyvstop+208,
yycrank+308,	yysvec+29,	yyvstop+210,
yycrank+388,	yysvec+29,	yyvstop+212,
yycrank+401,	yysvec+29,	yyvstop+214,
yycrank+364,	yysvec+29,	yyvstop+216,
yycrank+-420,	yysvec+12,	0,	
yycrank+393,	yysvec+29,	yyvstop+218,
yycrank+389,	yysvec+29,	yyvstop+220,
yycrank+399,	yysvec+29,	yyvstop+222,
yycrank+543,	yysvec+29,	yyvstop+224,
yycrank+403,	yysvec+29,	yyvstop+226,
yycrank+462,	yysvec+29,	yyvstop+228,
yycrank+354,	yysvec+29,	yyvstop+230,
yycrank+456,	yysvec+29,	yyvstop+232,
yycrank+0,	0,		yyvstop+234,
yycrank+1106,	yysvec+29,	yyvstop+236,
yycrank+-1223,	0,		yyvstop+240,
yycrank+479,	yysvec+29,	yyvstop+242,
yycrank+0,	0,		yyvstop+245,
yycrank+0,	0,		yyvstop+247,
yycrank+396,	yysvec+29,	yyvstop+249,
yycrank+379,	yysvec+29,	yyvstop+251,
yycrank+-469,	yysvec+8,	yyvstop+253,
yycrank+0,	0,		yyvstop+255,
yycrank+0,	0,		yyvstop+257,
yycrank+997,	0,		0,	
yycrank+0,	0,		yyvstop+259,
yycrank+1274,	yysvec+72,	yyvstop+261,
yycrank+1025,	0,		0,	
yycrank+1116,	0,		0,	
yycrank+543,	yysvec+125,	yyvstop+264,
yycrank+478,	yysvec+79,	yyvstop+266,
yycrank+1311,	0,		yyvstop+268,
yycrank+0,	0,		yyvstop+270,
yycrank+0,	0,		yyvstop+272,
yycrank+1425,	0,		0,	
yycrank+1500,	0,		yyvstop+274,
yycrank+378,	yysvec+29,	yyvstop+276,
yycrank+474,	yysvec+29,	yyvstop+279,
yycrank+452,	yysvec+29,	yyvstop+281,
yycrank+463,	yysvec+29,	yyvstop+283,
yycrank+483,	yysvec+29,	yyvstop+285,
yycrank+472,	yysvec+29,	yyvstop+287,
yycrank+475,	yysvec+29,	yyvstop+289,
yycrank+482,	yysvec+29,	yyvstop+291,
yycrank+515,	yysvec+29,	yyvstop+293,
yycrank+517,	yysvec+29,	yyvstop+295,
yycrank+506,	yysvec+29,	yyvstop+297,
yycrank+519,	yysvec+29,	yyvstop+299,
yycrank+520,	yysvec+29,	yyvstop+301,
yycrank+531,	yysvec+29,	yyvstop+303,
yycrank+1614,	0,		0,	
yycrank+395,	yysvec+29,	yyvstop+305,
yycrank+528,	yysvec+29,	yyvstop+307,
yycrank+532,	yysvec+29,	yyvstop+309,
yycrank+536,	yysvec+29,	yyvstop+311,
yycrank+534,	yysvec+29,	yyvstop+313,
yycrank+1588,	yysvec+29,	yyvstop+315,
yycrank+533,	yysvec+29,	yyvstop+318,
yycrank+548,	yysvec+29,	yyvstop+320,
yycrank+1247,	0,		0,	
yycrank+697,	yysvec+156,	yyvstop+322,
yycrank+1388,	0,		0,	
yycrank+1421,	0,		0,	
yycrank+709,	yysvec+159,	yyvstop+324,
yycrank+1104,	0,		yyvstop+326,
yycrank+687,	0,		yyvstop+328,
yycrank+1658,	0,		yyvstop+330,
yycrank+545,	yysvec+29,	yyvstop+332,
yycrank+558,	yysvec+29,	yyvstop+334,
yycrank+464,	yysvec+29,	yyvstop+336,
yycrank+839,	yysvec+29,	yyvstop+338,
yycrank+561,	yysvec+29,	yyvstop+340,
yycrank+512,	yysvec+29,	yyvstop+342,
yycrank+560,	yysvec+29,	yyvstop+344,
yycrank+654,	yysvec+29,	yyvstop+346,
yycrank+544,	yysvec+29,	yyvstop+348,
yycrank+487,	yysvec+29,	yyvstop+350,
yycrank+555,	yysvec+29,	yyvstop+353,
yycrank+666,	yysvec+29,	yyvstop+355,
yycrank+664,	yysvec+29,	yyvstop+357,
yycrank+503,	0,		0,	
yycrank+504,	0,		0,	
yycrank+541,	0,		0,	
yycrank+556,	0,		0,	
yycrank+562,	0,		0,	
yycrank+587,	0,		0,	
yycrank+571,	0,		0,	
yycrank+665,	yysvec+29,	yyvstop+359,
yycrank+848,	yysvec+29,	yyvstop+361,
yycrank+667,	yysvec+29,	yyvstop+363,
yycrank+576,	yysvec+29,	yyvstop+365,
yycrank+651,	yysvec+29,	yyvstop+367,
yycrank+578,	yysvec+29,	yyvstop+369,
yycrank+1711,	yysvec+29,	yyvstop+372,
yycrank+690,	yysvec+29,	yyvstop+375,
yycrank+606,	yysvec+29,	yyvstop+377,
yycrank+733,	yysvec+161,	yyvstop+380,
yycrank+671,	yysvec+158,	yyvstop+382,
yycrank+766,	yysvec+161,	yyvstop+384,
yycrank+652,	yysvec+29,	yyvstop+386,
yycrank+691,	yysvec+29,	yyvstop+388,
yycrank+608,	yysvec+29,	yyvstop+390,
yycrank+919,	yysvec+87,	0,	
yycrank+1773,	0,		0,	
yycrank+676,	yysvec+29,	yyvstop+392,
yycrank+711,	yysvec+29,	yyvstop+394,
yycrank+679,	yysvec+29,	yyvstop+396,
yycrank+682,	yysvec+29,	yyvstop+398,
yycrank+705,	yysvec+29,	yyvstop+400,
yycrank+715,	yysvec+29,	yyvstop+402,
yycrank+706,	yysvec+29,	yyvstop+404,
yycrank+746,	yysvec+29,	yyvstop+406,
yycrank+621,	0,		0,	
yycrank+704,	0,		0,	
yycrank+717,	0,		0,	
yycrank+727,	0,		0,	
yycrank+729,	0,		0,	
yycrank+736,	0,		0,	
yycrank+735,	0,		0,	
yycrank+776,	yysvec+29,	yyvstop+408,
yycrank+1053,	yysvec+87,	0,	
yycrank+1887,	0,		0,	
yycrank+801,	yysvec+29,	yyvstop+410,
yycrank+760,	yysvec+29,	yyvstop+412,
yycrank+767,	yysvec+29,	yyvstop+414,
yycrank+798,	yysvec+29,	yyvstop+416,
yycrank+745,	yysvec+29,	yyvstop+418,
yycrank+796,	yysvec+29,	yyvstop+420,
yycrank+0,	0,		yyvstop+422,
yycrank+1897,	yysvec+200,	0,	
yycrank+830,	yysvec+29,	yyvstop+424,
yycrank+802,	yysvec+29,	yyvstop+426,
yycrank+827,	yysvec+29,	yyvstop+428,
yycrank+833,	yysvec+29,	yyvstop+430,
yycrank+795,	yysvec+29,	yyvstop+432,
yycrank+831,	yysvec+29,	yyvstop+434,
yycrank+869,	yysvec+29,	yyvstop+436,
yycrank+834,	yysvec+29,	yyvstop+438,
yycrank+777,	0,		0,	
yycrank+787,	0,		0,	
yycrank+789,	0,		0,	
yycrank+844,	0,		0,	
yycrank+831,	0,		0,	
yycrank+847,	0,		0,	
yycrank+836,	0,		0,	
yycrank+859,	yysvec+29,	yyvstop+440,
yycrank+1176,	yysvec+218,	0,	
yycrank+850,	yysvec+29,	yyvstop+442,
yycrank+852,	yysvec+29,	yyvstop+444,
yycrank+954,	yysvec+29,	yyvstop+446,
yycrank+844,	yysvec+29,	yyvstop+448,
yycrank+1449,	yysvec+29,	yyvstop+450,
yycrank+1639,	yysvec+29,	yyvstop+452,
yycrank+1168,	0,		0,	
yycrank+861,	yysvec+29,	yyvstop+454,
yycrank+961,	yysvec+29,	yyvstop+456,
yycrank+973,	yysvec+29,	yyvstop+458,
yycrank+845,	yysvec+29,	yyvstop+460,
yycrank+974,	yysvec+29,	yyvstop+462,
yycrank+959,	yysvec+29,	yyvstop+464,
yycrank+862,	yysvec+29,	yyvstop+466,
yycrank+845,	0,		0,	
yycrank+872,	0,		0,	
yycrank+0,	0,		yyvstop+468,
yycrank+860,	0,		0,	
yycrank+870,	0,		0,	
yycrank+883,	0,		0,	
yycrank+895,	0,		0,	
yycrank+899,	yysvec+29,	yyvstop+470,
yycrank+1178,	0,		0,	
yycrank+1923,	0,		0,	
yycrank+977,	yysvec+29,	yyvstop+472,
yycrank+1073,	yysvec+29,	yyvstop+474,
yycrank+1093,	yysvec+29,	yyvstop+476,
yycrank+955,	yysvec+29,	yyvstop+478,
yycrank+1281,	yysvec+87,	0,	
yycrank+1949,	0,		0,	
yycrank+1300,	yysvec+87,	0,	
yycrank+1980,	0,		0,	
yycrank+1080,	yysvec+29,	yyvstop+480,
yycrank+956,	yysvec+29,	yyvstop+482,
yycrank+1082,	yysvec+29,	yyvstop+484,
yycrank+1092,	yysvec+29,	yyvstop+486,
yycrank+1089,	yysvec+29,	yyvstop+488,
yycrank+1103,	yysvec+29,	yyvstop+490,
yycrank+981,	yysvec+29,	yyvstop+492,
yycrank+896,	0,		0,	
yycrank+897,	0,		0,	
yycrank+931,	0,		0,	
yycrank+933,	0,		0,	
yycrank+966,	0,		0,	
yycrank+989,	0,		0,	
yycrank+1167,	yysvec+29,	yyvstop+494,
yycrank+1618,	yysvec+267,	0,	
yycrank+1162,	yysvec+29,	yyvstop+496,
yycrank+1196,	yysvec+29,	yyvstop+498,
yycrank+1164,	yysvec+29,	yyvstop+500,
yycrank+1644,	yysvec+29,	yyvstop+502,
yycrank+1620,	yysvec+273,	0,	
yycrank+0,	0,		yyvstop+504,
yycrank+1975,	yysvec+275,	0,	
yycrank+1084,	yysvec+29,	yyvstop+506,
yycrank+1011,	yysvec+29,	yyvstop+508,
yycrank+1105,	yysvec+29,	yyvstop+510,
yycrank+1179,	yysvec+29,	yyvstop+512,
yycrank+979,	yysvec+29,	yyvstop+514,
yycrank+980,	yysvec+29,	yyvstop+516,
yycrank+1027,	0,		0,	
yycrank+1009,	0,		0,	
yycrank+1056,	0,		0,	
yycrank+1076,	0,		0,	
yycrank+1082,	0,		0,	
yycrank+1086,	0,		0,	
yycrank+1224,	yysvec+29,	yyvstop+518,
yycrank+1624,	0,		0,	
yycrank+0,	0,		yyvstop+520,
yycrank+1198,	yysvec+29,	yyvstop+522,
yycrank+1223,	yysvec+29,	yyvstop+524,
yycrank+1227,	yysvec+29,	yyvstop+526,
yycrank+1653,	yysvec+87,	0,	
yycrank+2094,	0,		0,	
yycrank+1775,	0,		0,	
yycrank+0,	0,		yyvstop+528,
yycrank+1779,	0,		0,	
yycrank+1246,	yysvec+29,	yyvstop+530,
yycrank+1247,	yysvec+29,	yyvstop+532,
yycrank+1248,	yysvec+29,	yyvstop+534,
yycrank+1228,	yysvec+29,	yyvstop+536,
yycrank+1343,	yysvec+29,	yyvstop+538,
yycrank+1112,	0,		0,	
yycrank+1107,	0,		0,	
yycrank+1147,	0,		0,	
yycrank+1178,	0,		0,	
yycrank+1161,	0,		0,	
yycrank+1168,	0,		0,	
yycrank+1338,	yysvec+29,	yyvstop+540,
yycrank+1297,	yysvec+29,	yyvstop+542,
yycrank+1260,	yysvec+29,	yyvstop+544,
yycrank+1342,	yysvec+29,	yyvstop+546,
yycrank+1783,	0,		0,	
yycrank+2120,	0,		0,	
yycrank+1195,	yysvec+29,	yyvstop+548,
yycrank+1225,	yysvec+29,	yyvstop+550,
yycrank+1226,	yysvec+29,	yyvstop+552,
yycrank+1345,	yysvec+29,	yyvstop+554,
yycrank+1245,	0,		0,	
yycrank+1240,	0,		0,	
yycrank+1260,	0,		0,	
yycrank+1352,	0,		0,	
yycrank+1260,	0,		0,	
yycrank+1277,	0,		0,	
yycrank+1346,	yysvec+29,	yyvstop+556,
yycrank+1263,	yysvec+29,	yyvstop+558,
yycrank+1356,	yysvec+29,	yyvstop+560,
yycrank+1293,	yysvec+29,	yyvstop+562,
yycrank+0,	0,		yyvstop+564,
yycrank+1376,	yysvec+29,	yyvstop+566,
yycrank+1377,	yysvec+29,	yyvstop+568,
yycrank+1522,	yysvec+29,	yyvstop+570,
yycrank+1545,	yysvec+29,	yyvstop+572,
yycrank+0,	0,		yyvstop+574,
yycrank+0,	0,		yyvstop+576,
yycrank+1303,	0,		0,	
yycrank+1291,	0,		0,	
yycrank+1339,	0,		0,	
yycrank+1348,	0,		0,	
yycrank+1363,	0,		0,	
yycrank+1453,	yysvec+29,	yyvstop+578,
yycrank+1557,	yysvec+29,	yyvstop+580,
yycrank+1355,	yysvec+29,	yyvstop+582,
yycrank+1565,	yysvec+29,	yyvstop+584,
yycrank+1486,	yysvec+29,	yyvstop+586,
yycrank+1353,	0,		0,	
yycrank+1365,	0,		0,	
yycrank+0,	0,		yyvstop+588,
yycrank+0,	0,		yyvstop+590,
yycrank+1368,	0,		0,	
yycrank+1374,	yysvec+29,	yyvstop+592,
yycrank+1567,	yysvec+29,	yyvstop+594,
yycrank+1525,	yysvec+29,	yyvstop+596,
yycrank+1371,	0,		0,	
yycrank+0,	0,		yyvstop+598,
yycrank+1374,	0,		0,	
yycrank+1585,	yysvec+29,	yyvstop+600,
yycrank+1407,	yysvec+29,	yyvstop+602,
yycrank+1407,	0,		0,	
yycrank+1408,	0,		0,	
yycrank+1790,	yysvec+29,	yyvstop+604,
yycrank+1446,	0,		0,	
yycrank+1447,	0,		0,	
yycrank+1785,	yysvec+87,	0,	
yycrank+2146,	0,		0,	
yycrank+0,	0,		yyvstop+606,
yycrank+0,	0,		yyvstop+608,
yycrank+1951,	0,		0,	
yycrank+2172,	0,		0,	
yycrank+2182,	0,		0,	
yycrank+1794,	yysvec+393,	0,	
yycrank+1889,	0,		0,	
yycrank+0,	0,		yyvstop+610,
0,	0,	0};
struct yywork *yytop = yycrank+2277;
struct yysvf *yybgin = yysvec+1;
char yymatch[] = {
00  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
01  ,011 ,012 ,01  ,01  ,01  ,01  ,01  ,
01  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
01  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
011 ,01  ,'"' ,01  ,01  ,01  ,01  ,047 ,
01  ,01  ,01  ,'+' ,01  ,'+' ,01  ,01  ,
'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,
'0' ,'0' ,01  ,01  ,01  ,01  ,01  ,01  ,
'@' ,'A' ,'A' ,'A' ,'A' ,'E' ,'A' ,'G' ,
'G' ,'G' ,'G' ,'G' ,'G' ,'G' ,'G' ,'G' ,
'G' ,'G' ,'G' ,'G' ,'G' ,'G' ,'G' ,'G' ,
'X' ,'G' ,'G' ,01  ,047 ,01  ,01  ,'_' ,
01  ,'A' ,'A' ,'A' ,'A' ,'E' ,'A' ,'G' ,
'G' ,'G' ,'G' ,'G' ,'G' ,'G' ,'G' ,'G' ,
'G' ,'G' ,'G' ,'G' ,'G' ,'G' ,'G' ,'G' ,
'X' ,'G' ,'G' ,01  ,01  ,01  ,01  ,01  ,
0};
char yyextra[] = {
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0};
#ifndef lint
static	char ncform_sccsid[] = "@(#)ncform 1.8 89/09/18 SMI"; /* from S5R2 1.2 */
#endif

int yylineno =1;
# define YYU(x) x
# define NLSTATE yyprevious=YYNEWLINE
char yytext[YYLMAX];
struct yysvf *yylstate [YYLMAX], **yylsp, **yyolsp;
char yysbuf[YYLMAX];
char *yysptr = yysbuf;
int *yyfnd;
extern struct yysvf *yyestate;
int yyprevious = YYNEWLINE;
yylook(){
	register struct yysvf *yystate, **lsp;
	register struct yywork *yyt;
	struct yysvf *yyz;
	int yych, yyfirst;
	struct yywork *yyr;
# ifdef LEXDEBUG
	int debug;
# endif
	char *yylastch;
	/* start off machines */
# ifdef LEXDEBUG
	debug = 0;
# endif
	yyfirst=1;
	if (!yymorfg)
		yylastch = yytext;
	else {
		yymorfg=0;
		yylastch = yytext+yyleng;
		}
	for(;;){
		lsp = yylstate;
		yyestate = yystate = yybgin;
		if (yyprevious==YYNEWLINE) yystate++;
		for (;;){
# ifdef LEXDEBUG
			if(debug)fprintf(yyout,"state %d\n",yystate-yysvec-1);
# endif
			yyt = yystate->yystoff;
			if(yyt == yycrank && !yyfirst){  /* may not be any transitions */
				yyz = yystate->yyother;
				if(yyz == 0)break;
				if(yyz->yystoff == yycrank)break;
				}
			*yylastch++ = yych = lex_input();
			yyfirst=0;
		tryagain:
# ifdef LEXDEBUG
			if(debug){
				fprintf(yyout,"char ");
				allprint(yych);
				putchar('\n');
				}
# endif
			yyr = yyt;
			if ( (int)yyt > (int)yycrank){
				yyt = yyr + yych;
				if (yyt <= yytop && yyt->verify+yysvec == yystate){
					if(yyt->advance+yysvec == YYLERR)	/* error transitions */
						{unput(*--yylastch);break;}
					*lsp++ = yystate = yyt->advance+yysvec;
					goto contin;
					}
				}
# ifdef YYOPTIM
			else if((int)yyt < (int)yycrank) {		/* r < yycrank */
				yyt = yyr = yycrank+(yycrank-yyt);
# ifdef LEXDEBUG
				if(debug)fprintf(yyout,"compressed state\n");
# endif
				yyt = yyt + yych;
				if(yyt <= yytop && yyt->verify+yysvec == yystate){
					if(yyt->advance+yysvec == YYLERR)	/* error transitions */
						{unput(*--yylastch);break;}
					*lsp++ = yystate = yyt->advance+yysvec;
					goto contin;
					}
				yyt = yyr + YYU(yymatch[yych]);
# ifdef LEXDEBUG
				if(debug){
					fprintf(yyout,"try fall back character ");
					allprint(YYU(yymatch[yych]));
					putchar('\n');
					}
# endif
				if(yyt <= yytop && yyt->verify+yysvec == yystate){
					if(yyt->advance+yysvec == YYLERR)	/* error transition */
						{unput(*--yylastch);break;}
					*lsp++ = yystate = yyt->advance+yysvec;
					goto contin;
					}
				}
			if ((yystate = yystate->yyother) && (yyt= yystate->yystoff) != yycrank){
# ifdef LEXDEBUG
				if(debug)fprintf(yyout,"fall back to state %d\n",yystate-yysvec-1);
# endif
				goto tryagain;
				}
# endif
			else
				{unput(*--yylastch);break;}
		contin:
# ifdef LEXDEBUG
			if(debug){
				fprintf(yyout,"state %d char ",yystate-yysvec-1);
				allprint(yych);
				putchar('\n');
				}
# endif
			;
			}
# ifdef LEXDEBUG
		if(debug){
			fprintf(yyout,"stopped at %d with ",*(lsp-1)-yysvec-1);
			allprint(yych);
			putchar('\n');
			}
# endif
		while (lsp-- > yylstate){
			*yylastch-- = 0;
			if (*lsp != 0 && (yyfnd= (*lsp)->yystops) && *yyfnd > 0){
				yyolsp = lsp;
				if(yyextra[*yyfnd]){		/* must backup */
					while(yyback((*lsp)->yystops,-*yyfnd) != 1 && lsp > yylstate){
						lsp--;
						unput(*yylastch--);
						}
					}
				yyprevious = YYU(*yylastch);
				yylsp = lsp;
				yyleng = yylastch-yytext+1;
				yytext[yyleng] = 0;
# ifdef LEXDEBUG
				if(debug){
					fprintf(yyout,"\nmatch ");
					sprint(yytext);
					fprintf(yyout," action %d\n",*yyfnd);
					}
# endif
				return(*yyfnd++);
				}
			unput(*yylastch);
			}
		if (yytext[0] == 0  /* && feof(yyin) */)
			{
			yysptr=yysbuf;
			return(0);
			}
		yyprevious = yytext[0] = lex_input();
		if (yyprevious>0)
			lex_output(yyprevious);
		yylastch=yytext;
# ifdef LEXDEBUG
		if(debug)putchar('\n');
# endif
		}
	}

#if defined (__cplusplus) || defined (c_plusplus)
yyback(int * p, int m)
#else
yyback(p, m)
	int *p;
#endif
{
if (p==0) return(0);
while (*p)
	{
	if (*p++ == m)
		return(1);
	}
return(0);
}
	/* the following are only used in the lex library */
yyinput(){
	return(lex_input());
	}

#if defined (__cplusplus) || defined (c_plusplus)
void yyoutput (int c) {
#else
yyoutput(c)
  	int c; {
#endif
	lex_output(c);
	}

#if defined (__cplusplus) || defined (c_plusplus)
void yyunput(int c) {
#else
yyunput(c)
   int c; {
#endif
	unput(c);
	}
