5 struct yysvf *yylstate [YYLMAX], **yylsp, **yyolsp;
7 Uchar *yysptr = yysbuf;
9 extern struct yysvf *yyestate;
10 int yyprevious = YYNEWLINE;
12 extern void allprint(int);
15 struct yysvf *yystate, **lsp;
24 /* start off machines */
29 yylastch = (Uchar*)yytext;
32 yylastch = (Uchar*)yytext+yyleng;
36 yyestate = yystate = yybgin;
37 if (yyprevious==YYNEWLINE) yystate++;
40 if(debug)fprintf(yyout,"state %d\n",yystate-yysvec-1);
42 yyt = yystate->yystoff;
43 if(yyt == yycrank){ /* may not be any transitions */
44 yyz = yystate->yyother;
46 if(yyz->yystoff == yycrank)break;
48 *yylastch++ = yych = input();
52 fprintf(yyout,"char ");
60 if (yyt <= yytop && yyt->verify+yysvec == yystate){
61 if(yyt->advance+yysvec == YYLERR) /* error transitions */
62 {unput(*--yylastch);break;}
63 *lsp++ = yystate = yyt->advance+yysvec;
68 else if(yyt < yycrank) { /* r < yycrank */
69 yyt = yyr = yycrank+(yycrank-yyt);
71 if(debug)fprintf(yyout,"compressed state\n");
74 if(yyt <= yytop && yyt->verify+yysvec == yystate){
75 if(yyt->advance+yysvec == YYLERR) /* error transitions */
76 {unput(*--yylastch);break;}
77 *lsp++ = yystate = yyt->advance+yysvec;
80 yyt = yyr + YYU(yymatch[yych]);
83 fprintf(yyout,"try fall back character ");
84 allprint(YYU(yymatch[yych]));
88 if(yyt <= yytop && yyt->verify+yysvec == yystate){
89 if(yyt->advance+yysvec == YYLERR) /* error transition */
90 {unput(*--yylastch);break;}
91 *lsp++ = yystate = yyt->advance+yysvec;
95 if ((yystate = yystate->yyother) && (yyt= yystate->yystoff) != yycrank){
97 if(debug)fprintf(yyout,"fall back to state %d\n",yystate-yysvec-1);
103 {unput(*--yylastch);break;}
107 fprintf(yyout,"state %d char ",yystate-yysvec-1);
116 fprintf(yyout,"stopped at %d with ",lsp>yylstate?*(lsp-1)-yysvec-1:0);
121 while (lsp-- > yylstate){
123 if (*lsp != 0 && (yyfnd= (*lsp)->yystops) && *yyfnd > 0){
125 if(yyextra[*yyfnd]){ /* must backup */
126 while(yyback((*lsp)->yystops,-*yyfnd) != 1 && lsp > yylstate){
131 yyprevious = YYU(*yylastch);
133 yyleng = yylastch-(Uchar*)yytext+1;
137 fprintf(yyout,"\nmatch '%s'", yytext);
138 fprintf(yyout," action %d\n",*yyfnd);
145 if (yytext[0] == 0 /* && feof(yyin) */)
150 yyprevious = input();
151 yytext[0] = yyprevious;
154 yylastch = (Uchar*)yytext;
156 if(debug)putchar('\n');
160 yyback(int *p, int m)
170 /* the following are only used in the lex library */