date and time created 88/12/12 20:54:57 by kfall
[unix-history] / usr / src / old / lex / libln / yyless.c
/* @(#)yyless.c 4.2 %G% */
yyless(x)
{
extern char yytext[];
register char *lastch, *ptr;
extern int yyleng;
extern int yyprevious;
lastch = yytext+yyleng;
if (x>=0 && x <= yyleng)
ptr = x + yytext;
else
ptr = (char *) x;
while (lastch > ptr)
yyunput(*--lastch);
*lastch = 0;
if (ptr >yytext)
yyprevious = *--lastch;
yyleng = ptr-yytext;
}