Bell 32V development
[unix-history] / usr / src / libln / reject.c
CommitLineData
2c0d4653
TL
1# include <stdio.h>
2extern struct {int *yyaa, *yybb; int *yystops;} *yylstate [], **yylsp, **yyolsp;
3yyreject ()
4{
5extern FILE *yyout, *yyin;
6extern int yyprevious , *yyfnd;
7extern char yyextra[];
8extern char yytext[];
9extern int yyleng;
10for( ; yylsp < yyolsp; yylsp++)
11 yytext[yyleng++] = yyinput();
12if (*yyfnd > 0)
13 return(yyracc(*yyfnd++));
14while (yylsp-- > yylstate)
15 {
16 yyunput(yytext[yyleng-1]);
17 yytext[--yyleng] = 0;
18 if (*yylsp != 0 && (yyfnd= (*yylsp)->yystops) && *yyfnd > 0)
19 return(yyracc(*yyfnd++));
20 }
21if (yytext[0] == 0)
22 return(0);
23yyoutput(yyprevious = yyinput());
24yyleng=0;
25return(-1);
26}
27yyracc(m)
28{
29yyolsp = yylsp;
30if (yyextra[m])
31 {
32 while (yyback((*yylsp)->yystops, -m) != 1 && yylsp>yylstate)
33 {
34 yylsp--;
35 yyunput(yytext[--yyleng]);
36 }
37 }
38yyprevious = yytext[yyleng-1];
39yytext[yyleng] = 0;
40return(m);
41}