windows-nt/Source/XPSP1/NT/com/rpc/tools/yacc/yyless.c

22 lines
418 B
C
Raw Normal View History

2020-09-26 03:20:57 -05:00
// Copyright (c) 1993-1999 Microsoft Corporation
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 = x;
while (lastch > ptr)
yyunput(*--lastch);
*lastch = 0;
if (ptr >yytext)
yyprevious = *--lastch;
yyleng = ptr-yytext;
}