# include # include # include # include # define U(x) ((x)&0377) # define NCH 256 # 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 200 #ifdef __cplusplus int yylook(void); extern "C" int yywrap(void), yyless(int), yyreject(void); #endif /* __cplusplus */ #if defined(__cplusplus) && defined(_CPP_IOSTREAMS) # include # define output(c) (*yyout) << ((unsigned char) c) # define input() (((yytchar=yysptr>yysbuf?U(*--yysptr):yyin->get())==10?(yylineno++,yytchar):yytchar)==EOF?0:yytchar) # define ECHO (*yyout) << yytext istream *yyin = &cin; ostream *yyout = &cout; #else # define output(c) putc(c,yyout) # define input() (((yytchar=yysptr>yysbuf?U(*--yysptr):getc(yyin))==10?(yylineno++,yytchar):yytchar)==EOF?0:yytchar) # define ECHO fprintf(yyout, "%S",yywtext) FILE *yyin = NULL, *yyout = NULL; #endif /* defined(__cplusplus) && defined(_CPP_IOSTREAMS) */ # define unput(c) {yytchar= (c);if(yytchar=='\n')yylineno--;*yysptr++=yytchar;} # define yymore() (yymorfg=1) # define REJECT { nstr = yyreject(); goto yyfussy;} # define yysetlocale() setlocale(LC_ALL,"") # define wreturn(r) return(yywreturn(r)) # define winput() yywinput() # define wunput(c) yywunput(c) # define woutput(c) yywoutput(c) int yyleng; extern unsigned char yytext[]; int yywleng; extern wchar_t yywtext[]; int yymorfg; int yymbcurmax = -1; int __once_yylex = 1; extern unsigned char *yysptr, yysbuf[]; int yytchar; extern int yylineno; struct yywork; struct yysvf { struct yywork *yystoff; struct yysvf *yyother; int *yystops;}; struct yysvf *yyestate; extern struct yysvf yysvec[], *yybgin; #include "lex.h" int yyback(int *p, int m); # if YYHSIZE int yyhlook(int c, int v); int yymlook(int c); # endif /*YYHSIZE*/ # if YYXSIZE int yyxlook (int c, int v); #endif /*YYXSIZE*/ int yywinput(); void yywoutput(int c); void yywunput(int c); int yywreturn(int r); int yyinput(); void yyoutput(int c); void yyunput(int c); int yymbinput(); void yymboutput(int c); void yymbunput(int c); int yymbreturn(int x); # define YYNEWLINE 10 #ifdef __cplusplus extern "C" #endif /*__cplusplus */ int yylex(){ int nstr; extern int yyprevious; if (__once_yylex) { yysetlocale(); #if !(__cplusplus && _CPP_IOSTREAMS) if (yyin == NULL) yyin = stdin; if (yyout == NULL) yyout = stdout; #endif /* !(__cplusplus && _CPP_IOSTREAMS) */ __once_yylex = 0; } if(yymbcurmax<=0) yymbcurmax=MB_CUR_MAX; while((nstr = yylook()) >= 0) yyfussy: switch(nstr){ case 0: if(yywrap()) return(0); break; case 1: return(PCV); /*NOTREACHED*/ break; case 2: return(PAV); /*NOTREACHED*/ break; case 3: return(PRV); /*NOTREACHED*/ break; case 4: return(PTV); /*NOTREACHED*/ break; case 5: return(PEV); /*NOTREACHED*/ break; case 6: return(PPV); /*NOTREACHED*/ break; case 7: return(PRCE); /*NOTREACHED*/ break; case 8: return(POCE); /*NOTREACHED*/ break; case 9: return(PRRE); /*NOTREACHED*/ break; case 10: return(PORE); /*NOTREACHED*/ break; case 11: return(PAE); /*NOTREACHED*/ break; case 12: return(PIE); /*NOTREACHED*/ break; case 13: return(PPE); /*NOTREACHED*/ break; case 14: return(PPIE); /*NOTREACHED*/ break; case 15: return(PEL); /*NOTREACHED*/ break; case 16: return(PIV); /*NOTREACHED*/ break; case 17: return(PSV); /*NOTREACHED*/ break; case 18: return(PUC); /*NOTREACHED*/ break; case 19: return(PUA); /*NOTREACHED*/ break; case 20: return(PUR); /*NOTREACHED*/ break; case 21: return(PUE); /*NOTREACHED*/ break; case 22: return(PB); /*NOTREACHED*/ break; case 23: return(PA); /*NOTREACHED*/ break; case 24: return(PC); /*NOTREACHED*/ break; case 25: return(PAS); /*NOTREACHED*/ break; case 26: return(PEAS); /*NOTREACHED*/ break; case 27: return(PIB); /*NOTREACHED*/ break; case 28: return(PIA); /*NOTREACHED*/ break; case 29: return(POB); /*NOTREACHED*/ break; case 30: return(PEND); /*NOTREACHED*/ break; case 31: return(NUMBER); /*NOTREACHED*/ break; case 32: return(NAME); /*NOTREACHED*/ break; case 33: return(CVI); /*NOTREACHED*/ break; case 34: return(AVI); /*NOTREACHED*/ break; case 35: return(EVI); /*NOTREACHED*/ break; case 36: return(RVI); /*NOTREACHED*/ break; case 37: return(CV); /*NOTREACHED*/ break; case 38: return(AV); /*NOTREACHED*/ break; case 39: return(EV); /*NOTREACHED*/ break; case 40: return(RV); /*NOTREACHED*/ break; case 41: return(TV); /*NOTREACHED*/ break; case 42: return(PV); /*NOTREACHED*/ break; case 43: return(RW); /*NOTREACHED*/ break; case 44: return(RO); /*NOTREACHED*/ break; case 45: return(LBR); /*NOTREACHED*/ break; case 46: return(RBR); /*NOTREACHED*/ break; case 47: return(TEXT); /*NOTREACHED*/ break; case -1: break; default: #if defined(__cplusplus) && defined(_CPP_IOSTREAMS) (*yyout) << "bad switch yylook " << nstr; #else fprintf(yyout,"bad switch yylook %d",nstr); #endif /* defined(__cplusplus) && defined(_CPP_IOSTREAMS)*/ } return(0); } /* end of yylex */ int yyvstop[] = { 0, 31, 0, 45, 0, 46, 0, 32, 0, 38, 0, 37, 0, 39, 0, 42, 0, 44, 0, 40, 0, 43, 0, 41, 0, 23, 0, 22, 0, 24, 0, 16, 0, 17, 0, 34, 0, 33, 0, 35, 0, 36, 0, 47, 0, 11, 0, 25, 0, 2, 0, 1, 0, 15, 0, 5, 0, 28, 0, 27, 0, 12, 0, 29, 0, 13, 0, 6, 0, 3, 0, 4, 0, 26, 0, 30, 0, 8, 0, 10, 0, 14, 0, 19, 0, 18, 0, 21, 0, 20, 0, 7, 0, 9, 0, 0}; # define YYTYPE unsigned char struct yywork { YYTYPE verify, advance; } yycrank[] = { 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 14,0, 38,38, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 3,3, 38,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 3,0, 0,0, 0,0, 0,0, 23,38, 0,0, 0,0, 0,0, 0,0, 2,13, 0,0, 0,0, 1,3, 14,14, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 1,4, 1,4, 1,4, 1,4, 1,4, 1,4, 1,4, 1,4, 1,4, 1,4, 38,38, 3,14, 0,0, 0,0, 0,0, 0,0, 0,0, 1,5, 3,3, 1,6, 13,23, 1,7, 4,4, 4,4, 4,4, 4,4, 4,4, 4,4, 4,4, 4,4, 4,4, 4,4, 1,8, 15,34, 1,9, 16,35, 1,10, 17,36, 5,15, 6,16, 7,17, 8,18, 9,19, 1,11, 10,22, 1,12, 20,37, 26,42, 24,39, 9,20, 9,21, 33,60, 43,61, 13,24, 13,25, 13,26, 45,62, 13,27, 51,63, 29,50, 29,51, 13,28, 24,40, 27,43, 31,57, 24,41, 52,64, 13,29, 13,30, 30,53, 13,31, 13,32, 13,33, 30,54, 27,44, 29,52, 27,45, 28,47, 28,48, 31,58, 54,65, 28,49, 57,70, 31,59, 27,46, 30,55, 30,56, 55,66, 58,71, 55,67, 0,0, 55,68, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 55,69, 0,0}; struct yysvf yysvec[] = { 0, 0, 0, yycrank+1, 0, 0, yycrank+1, yysvec+1, 0, yycrank+-19, 0, 0, yycrank+23, 0, yyvstop+1, yycrank+1, 0, 0, yycrank+2, 0, 0, yycrank+3, 0, 0, yycrank+4, 0, 0, yycrank+12, 0, 0, yycrank+7, 0, 0, yycrank+0, 0, yyvstop+3, yycrank+0, 0, yyvstop+5, yycrank+37, 0, 0, yycrank+-1, yysvec+3, yyvstop+7, yycrank+9, 0, yyvstop+9, yycrank+11, 0, yyvstop+11, yycrank+13, 0, yyvstop+13, yycrank+0, 0, yyvstop+15, yycrank+0, 0, yyvstop+17, yycrank+22, 0, yyvstop+19, yycrank+0, 0, yyvstop+21, yycrank+0, 0, yyvstop+23, yycrank+1, 0, 0, yycrank+28, 0, yyvstop+25, yycrank+0, 0, yyvstop+27, yycrank+10, 0, yyvstop+29, yycrank+47, 0, 0, yycrank+61, 0, yyvstop+31, yycrank+42, 0, 0, yycrank+49, 0, 0, yycrank+46, 0, 0, yycrank+0, 0, yyvstop+33, yycrank+14, 0, 0, yycrank+0, 0, yyvstop+35, yycrank+0, 0, yyvstop+37, yycrank+0, 0, yyvstop+39, yycrank+0, 0, yyvstop+41, yycrank+-11, 0, yyvstop+43, yycrank+0, 0, yyvstop+45, yycrank+0, 0, yyvstop+47, yycrank+0, 0, yyvstop+49, yycrank+0, 0, yyvstop+51, yycrank+18, 0, 0, yycrank+0, 0, yyvstop+53, yycrank+37, 0, 0, yycrank+0, 0, yyvstop+55, yycrank+0, 0, yyvstop+57, yycrank+0, 0, yyvstop+59, yycrank+0, 0, yyvstop+61, yycrank+0, 0, yyvstop+63, yycrank+38, 0, 0, yycrank+46, 0, 0, yycrank+0, 0, yyvstop+65, yycrank+60, 0, 0, yycrank+71, 0, 0, yycrank+0, 0, yyvstop+67, yycrank+62, 0, 0, yycrank+68, 0, 0, yycrank+0, 0, yyvstop+69, yycrank+0, 0, yyvstop+71, yycrank+0, 0, yyvstop+73, yycrank+0, 0, yyvstop+75, yycrank+0, 0, yyvstop+77, yycrank+0, 0, yyvstop+79, yycrank+0, 0, yyvstop+81, yycrank+0, 0, yyvstop+83, yycrank+0, 0, yyvstop+85, yycrank+0, 0, yyvstop+87, yycrank+0, 0, yyvstop+89, yycrank+0, 0, yyvstop+91, yycrank+0, 0, yyvstop+93, 0, 0, 0}; struct yywork *yytop = yycrank+153; struct yysvf *yybgin = yysvec+1; unsigned char yymatch[] = { 00 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,012 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , '0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' , '0' ,'0' ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 0}; unsigned 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}; /* @(#)44 1.9.1.2 com/lib/l/ncform, libl, bos320, 9240320 9/28/92 09:13:13";*/ /* * COMPONENT_NAME: (LIBL) Lex Libraries * * FUNCTIONS: yylook, yyhlook, yyback, yyinput, yyoutput, yyunput, * yymbinput, yymboutput, yymbunput, yymbreturn * yywinput, yywoutput, yywunput, yywreturn * * ORIGINS: 03 * */ int yylineno =1; # define YYU(x) x # define NLSTATE yyprevious=YYNEWLINE # define YYCCLDOT 0x0001 unsigned char yytext[YYLMAX]; wchar_t yywtext[YYLMAX]; wchar_t yywbuf[YYLMAX]; unsigned char yytbuf[YYLMAX]; unsigned char *yytbp; int yytbi; wchar_t yytwc; struct yysvf *yylstate [YYLMAX], **yylsp, **yyolsp; unsigned char yysbuf[YYLMAX]; unsigned char *yysptr = yysbuf; int *yyfnd; extern struct yysvf *yyestate; int yyprevious = YYNEWLINE; # ifdef LEXDEBUG int debug; #ifdef __cplusplus #ifdef _CPP_IOSTREAMS void allprint(wchar_t); void sprint (wchar_t *); #else extern "C" void allprint(wchar_t); extern "C" void sprint (wchar_t *); #endif #endif # endif yylook() { register struct yysvf *yystate, **lsp; register struct yywork *yyt; struct yysvf *yyz; int yywch, yyfirst, yyw; struct yywork *yyr; wchar_t *yywlastch; /* * start off machines */ # ifdef LEXDEBUG debug = 1; # endif yyfirst=1; if (!yymorfg) yywlastch = yywtext; else { yymorfg=0; yywlastch = &(yywtext[yywleng]); } for(;;) { lsp = yylstate; yyestate = yystate = yybgin; if (yyprevious==YYNEWLINE) yystate++; for (;;) { # ifdef LEXDEBUG #if defined(__cplusplus) && defined(_CPP_IOSTREAMS) if(debug) (*yyout) << "state " << yystate-yysvec-1 << endl; #else if(debug) fprintf(yyout,"state %d\n",yystate-yysvec-1); #endif /* #if defined(__cplusplus) && defined(_CPP_IOSTREAMS) */ # 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; } yywch = winput(); *yywlastch++ = yywch; yyfirst=0; tryagain: # ifdef LEXDEBUG if(debug) { #if defined(__cplusplus) && defined(_CPP_IOSTREAMS) (*yyout) << "char "; allprint (yywch); (*yyout) << endl; #else fprintf(yyout,"char "); allprint(yywch); putchar('\n'); #endif /* #if defined(__cplusplus) && defined(_CPP_IOSTREAMS) */ } # endif yyr = yyt; if ( (int)yyt > (int)yycrank) { if (yywch < NCH) /* 8-bit */ { yyt = yyr + yywch; if (yyt <= yytop && yyt->verify+yysvec == yystate) { if(yyt->advance+yysvec == YYLERR) /* error transitions */ { wunput(*--yywlastch); break; } *lsp++ = yystate = yyt->advance+yysvec; goto contin; } } # if YYHSIZE else /* wide */ { if (yyw = yyhlook(yywch,yystate-yysvec)) { if (yywcrank[yyw].wadvance+yysvec==YYLERR) { wunput(*--yywlastch); break; } *lsp++ = yystate = yywcrank[yyw].wadvance+yysvec; goto contin; } } # endif /*YYHSIZE*/ } # ifdef YYOPTIM else if ((int)yyt < (int)yycrank) /* r < yycrank */ { yyt = yyr = yycrank+(yycrank-yyt); # ifdef LEXDEBUG #if defined(__cplusplus) && defined(_CPP_IOSTREAMS) if(debug) (*yyout) << "compressed state" << endl; #else if(debug) fprintf(yyout,"compressed state\n"); #endif /* #if defined(__cplusplus) && defined(_CPP_IOSTREAMS) */ # endif if (yywch < NCH) /* 8-bit */ { yyt = yyt + yywch; if(yyt <= yytop && yyt->verify+yysvec == yystate) { if(yyt->advance+yysvec == YYLERR) /* error transitions */ { wunput(*--yywlastch); break; } *lsp++ = yystate = yyt->advance+yysvec; goto contin; } yyt = yyr + YYU(yymatch[yywch]); # ifdef LEXDEBUG if(debug) { #if defined(__cplusplus) && defined(_CPP_IOSTREAMS) (*yyout) << "try fall back character "; allprint(YYU(yymatch[yywch])); (*yyout) << endl; #else fprintf(yyout,"try fall back character "); allprint(YYU(yymatch[yywch])); putchar('\n'); #endif /* #if defined(__cplusplus) && defined(_CPP_IOSTREAMS) */ } # endif if(yyt <= yytop && yyt->verify+yysvec == yystate) { if(yyt->advance+yysvec == YYLERR) /* error transition */ { wunput(*--yywlastch); break; } *lsp++ = yystate = yyt->advance+yysvec; goto contin; } } # if YYHSIZE else /* wide */ { if (yyw = yyhlook(yywch,yystate-yysvec)) { if (yywcrank[yyw].wadvance+yysvec==YYLERR) { wunput(*--yywlastch); break; } *lsp++ = yystate = yywcrank[yyw].wadvance+yysvec; goto contin; } if (yyw = yymlook(yywch)) /* find the target char */ { if (yyw = yyhlook(yyw,yystate-yysvec)) { if (yywcrank[yyw].wadvance+yysvec == YYLERR) { wunput(*--yywlastch); break; } *lsp++ = yystate = yywcrank[yyw].wadvance+yysvec; goto contin; } } } # endif /*YYHSIZE*/ # if YYXSIZE # ifdef MFDEBUG if (debug) { #if defined(__cplusplus) && defined(_CPP_IOSTREAMS) (*yyout) << "try extended ccl on char "; allprint(YYU(yywch)); (*yyout) << '\n'; #else fprintf (yyout, "try extended ccl on char "); allprint(YYU(yywch)); putchar('\n'); #endif /* #if defined(__cplusplus) && defined(_CPP_IOSTREAMS) */ } # endif yyw = yyxlook(yywch,yystate-yysvec); if (yyw != -1) { if (yyxccl[yyw].advance+yysvec == YYLERR) { wunput(*--yywlastch); break; } *lsp++ = yystate = yyxccl[yyw].advance+yysvec; goto contin; } # endif /*YYXSIZE*/ } /* r < yycrank */ if ((yystate = yystate->yyother) && (yyt= yystate->yystoff) != yycrank) { # ifdef LEXDEBUG #if defined(__cplusplus) && defined(_CPP_IOSTREAMS) if(debug) (*yyout) << "fall back to state " << yystate-yysvec-1 << endl; #else if(debug) fprintf(yyout,"fall back to state %d\n",yystate-yysvec-1); #endif /* #if defined(__cplusplus) && defined(_CPP_IOSTREAMS) */ # endif goto tryagain; } # endif /*YYOPTIM*/ else { wunput(*--yywlastch); break; } contin: # ifdef LEXDEBUG if(debug) { #if defined(__cplusplus) && defined(_CPP_IOSTREAMS) (*yyout) << "state " << yystate-yysvec-1 << " char "; allprint(yywch); (*yyout) << endl; #else fprintf(yyout,"state %d char ",yystate-yysvec-1); allprint(yywch); putchar('\n'); #endif /* #if defined(__cplusplus) && defined(_CPP_IOSTREAMS) */ } # endif ; /* contin: */ } /* for(;;) */ # ifdef LEXDEBUG if(debug) { #if defined(__cplusplus) && defined(_CPP_IOSTREAMS) (*yyout) << "stopped at " << (int) (*(lsp-1)-yysvec-1) << " with "; allprint(yywch); (*yyout) << endl; #else fprintf(yyout,"stopped at %d with ",*(lsp-1)-yysvec-1); allprint(yywch); putchar('\n'); #endif /* #if defined(__cplusplus) && defined(_CPP_IOSTREAMS) */ } # endif while (lsp-- > yylstate) { *yywlastch-- = 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--; wunput(*yywlastch--); } } yyprevious = YYU(*yywlastch); yylsp = lsp; yywleng = yywlastch-yywtext+1; yywtext[yywleng] = 0; # ifdef LEXDEBUG if(debug) { #if defined(__cplusplus) && defined(_CPP_IOSTREAMS) (*yyout) << "\nmatch "; sprint(yywtext); (*yyout) << " action " << *yyfnd << endl; #else fprintf(yyout,"\nmatch "); sprint(yywtext); fprintf(yyout," action %d\n",*yyfnd); #endif /* #if defined(__cplusplus) && defined(_CPP_IOSTREAMS) */ } # endif wreturn(*yyfnd++); } wunput(*yywlastch); } if (yywtext[0] == 0 /* && feof(yyin) */) { yysptr=yysbuf; wreturn(0); } yyprevious = yywtext[0] = winput(); if (yyprevious>0) woutput(yyprevious); yywlastch=yywtext; # ifdef LEXDEBUG #if defined(__cplusplus) && defined(_CPP_IOSTREAMS) if(debug) cout << endl; #else if(debug) putchar('\n'); #endif /* #if defined(__cplusplus) && defined(_CPP_IOSTREAMS) */ # endif } /* for (;;) */ wreturn(0); } int yyback(int *p, int m) { if (p==0) return(0); while (*p) { if (*p++ == m) return(1); } return(0); } # if YYHSIZE /* * wide chars are hashed in yywcrank, return the index of the found element, or * zero */ int yyhlook(int c, int v) { int n; n = (c % (YYHSIZE - 1)) + 1; for (;;) { if ((yywcrank[n].wch==c)&&(yywcrank[n].wverify==v)) return(n); n = yywcrank[n].wnext; if (n==0) return(0); } } # endif /*YYHSIZE*/ # if YYHSIZE /* * wide CCL chars are hashed in yywmatch, return the character to map to or * zero if there are none; each char occurs only once in the match table. */ int yymlook(int c) { # if YYMSIZE int n; n = (c % (YYMSIZE - 1)) + 1; while (n!=0) { if (yywmatch[n].wch == c) return(yywmatch[n].wmatch); n = yywmatch[n].wnext; } # endif /*YYMSIZE*/ return(0); } # endif /*YYHSIZE*/ # if YYXSIZE /* * general CCLs are described in yyxccl; return the index of the first * acceptable CCL that matches verification, -1 if none found. */ int yyxlook (int c, int v) { register int i; if (!c) /* c==0 => EOF */ return (-1); for (i = 0; (i < YYXSIZE) && (yyxccl[i].verify < v); i++) ; /*Empty*/ for ( ; (i < YYXSIZE) && (yyxccl[i].verify == v); i++) { switch (yyxccl[i].type) { case YYCCLDOT: return((c=='\n')?-1:i); } } return (-1); } #endif /* * The following are the multi-byte renditions of input, unput, and * output. They are referenced through the winput, wunput, and woutput macros * resepectively. * * A (-1) is returned if the character input is invalid. */ #ifdef __cplusplus #include #endif /* __cplusplus */ int yywinput() { yytbi=0; do { yytbuf[yytbi++]=input(); yytbuf[yytbi]=0; } while(mbsinvalid((const char *) yytbuf)&&(yytbi0;yytbi--) output(*yytbp++); } void yywunput(int c) { for(yytbi=wctomb((char *)yytbuf,(wchar_t)c)-1;yytbi>=0;yytbi--) unput(yytbuf[yytbi]); } /* * Convert yywtext to yytext prior to returning from yylook. It is referenced * through the wreturn macro. */ int yywreturn(int r) { yyleng=wcstombs((char *)yytext,yywtext,YYLMAX); if(yyleng<0) { yyleng=0; yytext[0]=0; } return(r); } /* * the following are only used in the lex library */ int yyinput() { return(input()); } void yyoutput(int c) { output(c); } void yyunput(int c) { unput(c); } int yymbinput() { return(winput()); } void yymboutput(int c) { woutput(c); } void yymbunput(int c) { wunput(c); } int yymbreturn(int x) { wreturn (x); }