# 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 output(c) putc(c,yyout) # define 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; /************** VHDL scanner in LEX format ********** * * Version 0.2 Wed Aug 11, 1993 * * This scanner is derived from a scanner of the ALLIANCE CAD toolset, * release 1.1. That toolset was written from: * MASI/CAO-VLSI CAD Team * Laboratoire MASI/CAO-VLSI * Tour 55-65, 2eme etage, Porte 13 * Universite Pierre et Marie Curie (PARIS VI) * 4, place Jussieu 75252 PARIS Cedex 05, FRANCE * The ALLIANCE CAD Toolset can be obtained from ftp site : ftp-masi.ibp.fr * * This scanner is avail at: ftp.cs.utwente.nl in pub/src/VHDL/Grammar * A corresponding Yacc grammar is available at the same site * * author of this derived scanner version: * Thomas Dettmer * Dortmund University * Dept. of Computer Scienc, LS1 * PB 500 500 * D-44221 Dortmund (Germany) * Phone: +49-231-755-6464 * e-mail: dettmer@ls1.informatik.uni-dortmund.de * * Please report discovered bugs, critics, suggestions * and changes you make to dettmer@ls1.informatik.uni-dortmund.de * a list of those that reported repaired (hopefully) errors can be found * at the end * **************************************************************** * * This file is intended not to be used for commercial purposes * without permission of the University of Dortmund * * NOTE THAT THERE IS NO WARRANTY FOR CORRECTNES, COMPLETENESS, SUPPORT * OR ANYTHING ELSE. *******************************************************/ #include #include #include #include #include "y.tab.h" #ifdef BASE_REPRESENTATION #ifdef ECHO #undef ECHO #endif #define ECHO echo(yytext) static void echo(s) char* s; { char loc[YYLMAX]; int l; l=strlen(s); loc[l]='\0'; while(l--) loc[l]=toupper(*(s+l)); fprintf(yyout, "%s\n", loc); } #endif int yycolumno=0; #undef input() int input(){ if (yysptr>yysbuf){ yytchar=U(*--yysptr); }else{ yytchar=getc(yyin); } if (yytchar=='\t') yycolumno+=8; else ++yycolumno; if (yytchar=='\n'){ yylineno++; } if (yytchar==EOF) return 0; return yytchar; } #undef unput(c) void unput(c) char c; { yytchar=c; *yysptr++=yytchar; if(yytchar=='\n') yylineno--; if (c=='\t') yycolumno-=8; else --yycolumno; } #define MVL_LG_MC 15 #define MVL_NB_MC 81 int MVL_LINNUM=1; typedef struct { char nom[MVL_LG_MC]; int kval; } el_mc; static el_mc tab_mc []= { {"abs" ,t_ABS}, {"access" ,t_ACCESS}, {"after" ,t_AFTER}, {"alias" ,t_ALIAS}, {"all" ,t_ALL}, {"and" ,t_AND}, {"architecture" ,t_ARCHITECTURE}, {"array" ,t_ARRAY}, {"assert" ,t_ASSERT}, {"attribute" ,t_ATTRIBUTE}, {"begin" ,t_BEGIN}, {"block" ,t_BLOCK}, {"body" ,t_BODY}, {"buffer" ,t_BUFFER}, {"bus" ,t_BUS}, {"case" ,t_CASE}, {"component" ,t_COMPONENT}, {"configuration" ,t_CONFIGURATION}, {"constant" ,t_CONSTANT}, {"disconnect" ,t_DISCONNECT}, {"downto" ,t_DOWNTO}, {"else" ,t_ELSE}, {"elsif" ,t_ELSIF}, {"end" ,t_END}, {"entity" ,t_ENTITY}, {"exit" ,t_EXIT}, {"file" ,t_FILE}, {"for" ,t_FOR}, {"function" ,t_FUNCTION}, {"generate" ,t_GENERATE}, {"generic" ,t_GENERIC}, {"guarded" ,t_GUARDED}, {"if" ,t_IF}, {"in" ,t_IN}, {"inout" ,t_INOUT}, {"is" ,t_IS}, {"label" ,t_LABEL}, {"library" ,t_LIBRARY}, {"linkage" ,t_LINKAGE}, {"loop" ,t_LOOP}, {"map" ,t_MAP}, {"mod" ,t_MOD}, {"nand" ,t_NAND}, {"new" ,t_NEW}, {"next" ,t_NEXT}, {"nor" ,t_NOR}, {"not" ,t_NOT}, {"null" ,t_NULL}, {"of" ,t_OF}, {"on" ,t_ON}, {"open" ,t_OPEN}, {"or" ,t_OR}, {"others" ,t_OTHERS}, {"out" ,t_OUT}, {"package" ,t_PACKAGE}, {"port" ,t_PORT}, {"procedure" ,t_PROCEDURE}, {"process" ,t_PROCESS}, {"range" ,t_RANGE}, {"record" ,t_RECORD}, {"register" ,t_REGISTER}, {"rem" ,t_REM}, {"report" ,t_REPORT}, {"return" ,t_RETURN}, {"select" ,t_SELECT}, {"severity" ,t_SEVERITY}, {"signal" ,t_SIGNAL}, {"subtype" ,t_SUBTYPE}, {"then" ,t_THEN}, {"to" ,t_TO}, {"transport" ,t_TRANSPORT}, {"type" ,t_TYPE}, {"units" ,t_UNITS}, {"until" ,t_UNTIL}, {"use" ,t_USE}, {"variable" ,t_VARIABLE}, {"wait" ,t_WAIT}, {"when" ,t_WHEN}, {"while" ,t_WHILE}, {"with" ,t_WITH}, {"xor" ,t_XOR} }; static int find_mc(s) char *s; { char loc[YYLMAX]; int l; el_mc *pt; l=strlen(s); strcpy(loc,s); while(l--) loc[l]=tolower(loc[l]); /* conversion en minuscules */ pt= (el_mc *) bsearch(loc, (char *)tab_mc,MVL_NB_MC,sizeof(el_mc),strcmp); if (pt==NULL) return(-1); else return(pt->kval); } # define YYNEWLINE 10 yylex(){ int nstr; extern int yyprevious; while((nstr = yylook()) >= 0) yyfussy: switch(nstr){ case 0: if(yywrap()) return(0); break; case 1: { /* nothing */ #ifndef BASE_REPRESENTATION ECHO; /*return(t_Space);*/ #endif } break; case 2: { ECHO; return(t_Ampersand); } break; case 3: { ECHO; return(t_Apostrophe); } break; case 4: { ECHO; return(t_LeftParen); } break; case 5: { ECHO; return(t_RightParen); } break; case 6: { ECHO; return(t_DoubleStar); } break; case 7: { ECHO; return(t_Star); } break; case 8: { ECHO; return(t_Plus); } break; case 9: { ECHO; return(t_Comma); } break; case 10: { ECHO; return(t_Minus); } break; case 11: { ECHO; return(t_VarAsgn); } break; case 12: { ECHO; return(t_Colon); } break; case 13: { ECHO; return(t_Semicolon); } break; case 14: { ECHO; return(t_LESym); } break; case 15: { ECHO; return(t_GESym); } break; case 16: { ECHO; return(t_LTSym); } break; case 17: { ECHO; return(t_GTSym); } break; case 18: { ECHO; return(t_EQSym); } break; case 19: { ECHO; return(t_NESym); } break; case 20: { ECHO; return(t_Arrow); } break; case 21: { ECHO; return(t_Box); } break; case 22: { ECHO; return(t_Bar); } break; case 23: { ECHO; return(t_Bar); } break; case 24: { ECHO; return(t_Dot); } break; case 25: { ECHO; return(t_Slash); } break; case 26: { int itoken; itoken=find_mc(yytext); if (itoken== -1) { ECHO; yylval.ds_Id.pos=yycolumno; yylval.ds_Id.len=strlen(yytext); yylval.ds_Id.line=yylineno; /* yylval.ds_Id.name= insertName(yytext); */ return ( t_Identifier ); } else { ECHO; return ( itoken ); } } break; case 27: { ECHO; return ( t_AbstractLit ); } break; case 28: { ECHO; return ( t_CharacterLit ); } break; case 29: { ECHO; return ( t_StringLit ); } break; case 30: { ECHO; return ( t_BitStringLit ); } break; case 31: { /* end of line */ MVL_LINNUM++; /* tobuf( "\n%4d\t", MVL_LINNUM);*/ #ifndef BASE_REPRESENTATION ECHO; #endif yycolumno=0; /*return(t_NEWLINE);*/ } break; case 32: { /* comment */ #ifndef BASE_REPRESENTATION ECHO; #endif /*return(t_COMMENT);*/ } break; case 33: { ECHO; /*return (t_UNKNOWN);*/ } break; case -1: break; default: fprintf(yyout,"bad switch yylook %d",nstr); } return(0); } /* end of yylex */ /************************************************************ * J.Gaisler reported: * MVL_NB_MC should be set to 81 - done * The original of this stuff was an illegal and wrong pointer *************************************************************/ int yyvstop[] = { 0, 33, 0, 1, 33, 0, 31, 0, 23, 33, 0, 33, 0, 33, 0, 2, 33, 0, 3, 33, 0, 4, 33, 0, 5, 33, 0, 7, 33, 0, 8, 33, 0, 9, 33, 0, 10, 33, 0, 24, 33, 0, 25, 33, 0, 27, 33, 0, 12, 33, 0, 13, 33, 0, 16, 33, 0, 18, 33, 0, 17, 33, 0, 26, 33, 0, 26, 33, 0, 22, 33, 0, 29, 0, 29, 0, 6, 0, -32, 0, 19, 0, 27, 0, 11, 0, 14, 0, 21, 0, 20, 0, 15, 0, 26, 0, 28, 0, 32, 0, 27, 0, 27, 0, 27, 0, 27, 0, 30, 0, 27, 0, 27, 0, 0}; # define YYTYPE char struct yywork { YYTYPE verify, advance; } yycrank[] = { 0,0, 0,0, 1,3, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 1,4, 1,5, 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,6, 1,7, 1,3, 1,3, 1,8, 1,9, 1,10, 1,11, 1,12, 1,13, 1,14, 1,15, 1,16, 1,17, 1,18, 1,19, 13,33, 16,34, 26,49, 29,28, 31,30, 26,50, 32,51, 58,68, 59,68, 1,20, 1,21, 1,22, 1,23, 1,24, 1,3, 1,3, 1,25, 1,26, 18,35, 20,42, 1,25, 23,45, 1,25, 22,43, 22,44, 24,46, 60,71, 53,60, 73,65, 54,40, 1,26, 65,74, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 53,61, 1,26, 0,0, 0,0, 1,3, 1,3, 1,3, 1,3, 0,0, 1,3, 1,25, 1,26, 57,67, 76,81, 1,25, 80,82, 1,25, 54,63, 0,0, 0,0, 60,71, 0,0, 55,64, 54,40, 1,26, 65,74, 72,60, 73,78, 59,70, 0,0, 58,69, 0,0, 0,0, 1,26, 55,65, 0,0, 1,3, 1,27, 1,3, 1,3, 2,7, 0,0, 2,3, 2,8, 2,9, 2,10, 2,11, 2,12, 2,13, 53,62, 2,15, 2,16, 2,17, 2,18, 37,54, 37,54, 37,54, 37,54, 37,54, 37,54, 37,54, 37,54, 37,54, 37,54, 2,20, 2,21, 2,22, 2,23, 2,24, 2,3, 2,3, 55,66, 2,26, 41,38, 41,38, 41,38, 41,38, 41,38, 41,38, 41,38, 41,38, 41,38, 41,38, 0,0, 0,0, 2,26, 72,77, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 2,26, 0,0, 0,0, 2,3, 2,3, 2,3, 2,3, 40,56, 2,3, 40,56, 2,26, 0,0, 40,57, 40,57, 40,57, 40,57, 40,57, 40,57, 40,57, 40,57, 40,57, 40,57, 0,0, 2,26, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 2,26, 0,0, 0,0, 2,3, 2,27, 2,3, 2,3, 7,0, 7,0, 7,0, 7,0, 7,0, 7,0, 7,0, 7,0, 7,28, 7,0, 7,0, 7,0, 7,0, 7,0, 7,0, 7,0, 7,0, 7,0, 7,0, 7,0, 7,0, 7,0, 7,0, 7,0, 7,0, 7,0, 7,0, 7,0, 7,0, 7,0, 7,0, 0,0, 7,28, 7,29, 7,28, 19,36, 7,28, 0,0, 0,0, 0,0, 0,0, 0,0, 7,28, 0,0, 0,0, 0,0, 19,37, 7,28, 19,38, 19,38, 19,38, 19,38, 19,38, 19,38, 19,38, 19,38, 19,38, 19,38, 19,39, 0,0, 0,0, 0,0, 0,0, 0,0, 7,28, 0,0, 0,0, 0,0, 7,28, 19,40, 7,28, 36,53, 36,53, 36,53, 36,53, 36,53, 36,53, 36,53, 36,53, 36,53, 36,53, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 36,53, 36,53, 36,53, 36,53, 36,53, 36,53, 0,0, 19,41, 7,28, 0,0, 0,0, 0,0, 7,28, 19,40, 7,28, 56,57, 56,57, 56,57, 56,57, 56,57, 56,57, 56,57, 56,57, 56,57, 56,57, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 36,53, 36,53, 36,53, 36,53, 36,53, 36,53, 7,0, 8,0, 8,0, 8,0, 8,0, 8,0, 8,0, 8,0, 8,0, 8,30, 8,0, 8,0, 8,0, 8,0, 8,0, 8,0, 8,0, 8,0, 8,0, 8,0, 8,0, 8,0, 8,0, 8,0, 8,0, 8,0, 8,0, 8,0, 8,0, 8,0, 8,0, 8,0, 0,0, 8,30, 8,30, 8,30, 0,0, 8,31, 0,0, 0,0, 0,0, 0,0, 0,0, 8,30, 0,0, 0,0, 0,0, 0,0, 8,30, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 39,55, 39,55, 39,55, 39,55, 39,55, 39,55, 39,55, 39,55, 39,55, 39,55, 8,30, 0,0, 0,0, 0,0, 8,30, 0,0, 8,30, 39,55, 39,55, 39,55, 39,55, 39,55, 39,55, 71,75, 0,0, 71,75, 0,0, 0,0, 71,76, 71,76, 71,76, 71,76, 71,76, 71,76, 71,76, 71,76, 71,76, 71,76, 0,0, 0,0, 0,0, 0,0, 8,30, 0,0, 0,0, 0,0, 8,30, 0,0, 8,30, 39,55, 39,55, 39,55, 39,55, 39,55, 39,55, 74,79, 0,0, 74,79, 0,0, 0,0, 74,80, 74,80, 74,80, 74,80, 74,80, 74,80, 74,80, 74,80, 74,80, 74,80, 0,0, 0,0, 8,0, 10,0, 10,0, 10,0, 10,0, 10,0, 10,0, 10,0, 10,0, 10,32, 10,0, 10,0, 10,0, 10,0, 10,0, 10,0, 10,0, 10,0, 10,0, 10,0, 10,0, 10,0, 10,0, 10,0, 10,0, 10,0, 10,0, 10,0, 10,0, 10,0, 10,0, 10,0, 0,0, 10,32, 10,32, 10,32, 0,0, 10,32, 0,0, 0,0, 0,0, 0,0, 0,0, 10,32, 0,0, 0,0, 0,0, 0,0, 10,32, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 49,58, 49,58, 49,58, 49,58, 49,58, 49,58, 49,58, 49,58, 49,58, 49,58, 10,32, 0,0, 0,0, 0,0, 10,32, 0,0, 10,32, 49,58, 49,58, 49,58, 49,58, 49,58, 49,58, 75,76, 75,76, 75,76, 75,76, 75,76, 75,76, 75,76, 75,76, 75,76, 75,76, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 10,32, 0,0, 0,0, 0,0, 10,32, 0,0, 10,32, 49,58, 49,58, 49,58, 49,58, 49,58, 49,58, 0,0, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 10,0, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 0,0, 0,0, 0,0, 0,0, 25,48, 0,0, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 25,47, 28,0, 28,0, 28,0, 28,0, 28,0, 28,0, 28,0, 28,0, 0,0, 28,0, 28,0, 28,0, 28,0, 28,0, 28,0, 28,0, 28,0, 28,0, 28,0, 28,0, 28,0, 28,0, 28,0, 28,0, 28,0, 28,0, 28,0, 28,0, 28,0, 28,0, 28,0, 0,0, 0,0, 28,29, 0,0, 0,0, 28,28, 30,0, 30,0, 30,0, 30,0, 30,0, 30,0, 30,0, 30,0, 0,0, 30,0, 30,0, 30,0, 30,0, 30,0, 30,0, 30,0, 30,0, 30,0, 30,0, 30,0, 30,0, 30,0, 30,0, 30,0, 30,0, 30,0, 30,0, 30,0, 30,0, 30,0, 30,0, 34,34, 0,0, 30,30, 0,0, 0,0, 30,31, 0,0, 0,0, 34,34, 34,52, 79,80, 79,80, 79,80, 79,80, 79,80, 79,80, 79,80, 79,80, 79,80, 79,80, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 34,34, 0,0, 34,34, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 34,34, 0,0, 0,0, 0,0, 0,0, 34,34, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 28,0, 0,0, 0,0, 0,0, 0,0, 0,0, 34,34, 0,0, 0,0, 0,0, 34,34, 0,0, 34,34, 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, 30,0, 34,34, 0,0, 0,0, 0,0, 34,34, 0,0, 34,34, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 48,47, 50,59, 50,59, 50,59, 50,59, 50,59, 50,59, 50,59, 50,59, 50,59, 50,59, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 50,59, 50,59, 50,59, 50,59, 50,59, 50,59, 61,72, 61,72, 61,72, 61,72, 61,72, 61,72, 61,72, 61,72, 61,72, 61,72, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 61,72, 61,72, 61,72, 61,72, 61,72, 61,72, 0,0, 0,0, 0,0, 50,59, 50,59, 50,59, 50,59, 50,59, 50,59, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 64,73, 64,73, 64,73, 64,73, 64,73, 64,73, 64,73, 64,73, 64,73, 64,73, 0,0, 61,72, 61,72, 61,72, 61,72, 61,72, 61,72, 64,73, 64,73, 64,73, 64,73, 64,73, 64,73, 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, 64,73, 64,73, 64,73, 64,73, 64,73, 64,73, 0,0, 0,0, 0,0}; struct yysvf yysvec[] = { 0, 0, 0, yycrank+-1, 0, 0, yycrank+-94, yysvec+1, 0, yycrank+0, 0, yyvstop+1, yycrank+0, 0, yyvstop+3, yycrank+0, 0, yyvstop+6, yycrank+0, 0, yyvstop+8, yycrank+-220, 0, yyvstop+11, yycrank+-347, 0, yyvstop+13, yycrank+0, 0, yyvstop+15, yycrank+-474, 0, yyvstop+18, yycrank+0, 0, yyvstop+21, yycrank+0, 0, yyvstop+24, yycrank+8, 0, yyvstop+27, yycrank+0, 0, yyvstop+30, yycrank+0, 0, yyvstop+33, yycrank+6, 0, yyvstop+36, yycrank+0, 0, yyvstop+39, yycrank+7, 0, yyvstop+42, yycrank+221, 0, yyvstop+45, yycrank+8, 0, yyvstop+48, yycrank+0, 0, yyvstop+51, yycrank+12, 0, yyvstop+54, yycrank+9, 0, yyvstop+57, yycrank+14, 0, yyvstop+60, yycrank+537, 0, yyvstop+63, yycrank+18, yysvec+25, yyvstop+66, yycrank+0, 0, yyvstop+69, yycrank+-659, yysvec+7, 0, yycrank+19, 0, yyvstop+72, yycrank+-696, yysvec+8, 0, yycrank+17, 0, yyvstop+74, yycrank+17, 0, 0, yycrank+0, 0, yyvstop+76, yycrank+-727, 0, yyvstop+78, yycrank+0, 0, yyvstop+80, yycrank+244, 0, 0, yycrank+94, 0, 0, yycrank+0, yysvec+19, yyvstop+82, yycrank+354, 0, 0, yycrank+146, 0, 0, yycrank+113, 0, 0, yycrank+0, 0, yyvstop+84, yycrank+0, 0, yyvstop+86, yycrank+0, 0, yyvstop+88, yycrank+0, 0, yyvstop+90, yycrank+0, 0, yyvstop+92, yycrank+0, yysvec+25, yyvstop+94, yycrank+783, 0, 0, yycrank+481, 0, 0, yycrank+858, 0, 0, yycrank+0, 0, yyvstop+96, yycrank+0, 0, yyvstop+98, yycrank+42, yysvec+36, 0, yycrank+10, yysvec+37, yyvstop+100, yycrank+64, yysvec+39, 0, yycrank+276, 0, 0, yycrank+5, yysvec+56, yyvstop+102, yycrank+23, yysvec+49, 0, yycrank+21, yysvec+50, 0, yycrank+7, 0, yyvstop+104, yycrank+881, 0, 0, yycrank+0, yysvec+36, 0, yycrank+0, yysvec+37, 0, yycrank+919, 0, 0, yycrank+12, 0, yyvstop+106, yycrank+0, yysvec+39, 0, yycrank+0, yysvec+56, 0, yycrank+0, 0, yyvstop+108, yycrank+0, yysvec+49, 0, yycrank+0, yysvec+50, 0, yycrank+382, 0, 0, yycrank+79, yysvec+61, 0, yycrank+20, yysvec+64, 0, yycrank+414, 0, 0, yycrank+504, 0, 0, yycrank+6, yysvec+75, yyvstop+110, yycrank+0, yysvec+61, 0, yycrank+0, yysvec+64, 0, yycrank+690, 0, 0, yycrank+8, yysvec+79, yyvstop+112, yycrank+0, yysvec+75, 0, yycrank+0, yysvec+79, 0, 0, 0, 0}; struct yywork *yytop = yycrank+1021; 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 ,'#' ,'#' , '#' ,'#' ,'#' ,'+' ,'#' ,'+' ,'#' ,'#' , '0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' , '0' ,'0' ,'#' ,'#' ,'#' ,'#' ,'#' ,'!' , '!' ,'A' ,'A' ,'A' ,'A' ,'E' ,'A' ,'G' , 'G' ,'G' ,'G' ,'G' ,'G' ,'G' ,'G' ,'G' , 'G' ,'G' ,'G' ,'G' ,'G' ,'G' ,'G' ,'G' , 'G' ,'G' ,'G' ,'!' ,'!' ,'!' ,'!' ,'#' , '!' ,'a' ,'a' ,'a' ,'a' ,'e' ,'a' ,'g' , 'g' ,'g' ,'g' ,'g' ,'g' ,'g' ,'g' ,'g' , 'g' ,'g' ,'g' ,'g' ,'g' ,'g' ,'g' ,'g' , 'g' ,'g' ,'g' ,'!' ,'#' ,'!' ,'!' ,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, 1,0,0,0,0,0,0,0, 0}; #ifndef lint static char ncform_sccsid[] = "@(#)ncform 1.6 88/02/08 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 = 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] = input(); if (yyprevious>0) output(yyprevious); yylastch=yytext; # ifdef LEXDEBUG if(debug)putchar('\n'); # endif } } yyback(p, m) int *p; { 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(input()); } yyoutput(c) int c; { output(c); } yyunput(c) int c; { unput(c); }