Commit | Line | Data |
---|---|---|
87c14f42 | 1 | /* @(#)yyless.c 4.2 %G% */ |
b04bff35 SL |
2 | |
3 | yyless(x) | |
4 | { | |
5 | extern char yytext[]; | |
6 | register char *lastch, *ptr; | |
7 | extern int yyleng; | |
8 | extern int yyprevious; | |
9 | lastch = yytext+yyleng; | |
10 | if (x>=0 && x <= yyleng) | |
11 | ptr = x + yytext; | |
12 | else | |
87c14f42 | 13 | ptr = (char *) x; |
b04bff35 SL |
14 | while (lastch > ptr) |
15 | yyunput(*--lastch); | |
16 | *lastch = 0; | |
17 | if (ptr >yytext) | |
18 | yyprevious = *--lastch; | |
19 | yyleng = ptr-yytext; | |
20 | } |