--- xinu/con/lex.yy.c 2018/04/24 17:39:04 1.1.1.1 +++ xinu/con/lex.yy.c 2018/04/24 17:40:18 1.1.1.2 @@ -6,7 +6,7 @@ # define YYLERR yysvec # define YYSTATE (yyestate-yysvec-1) # define YYOPTIM 1 -# define YYLMAX 200 +# define YYLMAX BUFSIZ # define output(c) putc(c,yyout) # define input() (((yytchar=yysptr>yysbuf?U(*--yysptr):getc(yyin))==10?(yylineno++,yytchar):yytchar)==EOF?0:yytchar) # define unput(c) {yytchar= (c);if(yytchar=='\n')yylineno--;*yysptr++=yytchar;} @@ -17,7 +17,7 @@ int yyleng; extern char yytext[]; int yymorfg; extern char *yysptr, yysbuf[]; int yytchar; -FILE *yyin ={stdin}, *yyout ={stdout}; +FILE *yyin = {stdin}, *yyout = {stdout}; extern int yylineno; struct yysvf { struct yywork *yystoff; @@ -170,7 +170,7 @@ default: fprintf(yyout,"bad switch yylook %d",nstr); } return(0); } /* end of yylex */ -int yyvstop[] ={ +int yyvstop[] = { 0, 41, @@ -376,7 +376,7 @@ int yyvstop[] ={ 0, 0}; # define YYTYPE char -struct yywork { YYTYPE verify, advance; } yycrank[] ={ +struct yywork { YYTYPE verify, advance; } yycrank[] = { 0,0, 0,0, 1,3, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 1,4, 1,5, @@ -436,7 +436,7 @@ struct yywork { YYTYPE verify, advance; 14,38, 14,38, 14,38, 14,38, 14,38, 14,38, 0,0, 0,0, 0,0}; -struct yysvf yysvec[] ={ +struct yysvf yysvec[] = { 0, 0, 0, yycrank+-1, 0, 0, yycrank+-18, yysvec+1, 0, @@ -509,7 +509,7 @@ yycrank+0, 0, yyvstop+144, 0, 0, 0}; struct yywork *yytop = yycrank+229; struct yysvf *yybgin = yysvec+1; -char yymatch[] ={ +char yymatch[] = { 00 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,011 ,012 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , @@ -527,7 +527,7 @@ char yymatch[] ={ 'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' , 'A' ,'A' ,'A' ,01 ,01 ,01 ,01 ,01 , 0}; -char yyextra[] ={ +char yyextra[] = { 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, @@ -535,7 +535,9 @@ char yyextra[] ={ 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0}; -/* ncform 4.1 83/08/11 */ +#ifndef lint +static char ncform_sccsid[] = "@(#)ncform 1.1 86/07/08 SMI"; /* from S5R2 1.2 */ +#endif int yylineno =1; # define YYU(x) x @@ -551,7 +553,7 @@ yylook(){ register struct yysvf *yystate, **lsp; register struct yywork *yyt; struct yysvf *yyz; - int yych; + int yych, yyfirst; struct yywork *yyr; # ifdef LEXDEBUG int debug; @@ -561,6 +563,7 @@ yylook(){ # ifdef LEXDEBUG debug = 0; # endif + yyfirst=1; if (!yymorfg) yylastch = yytext; else { @@ -576,12 +579,13 @@ yylook(){ if(debug)fprintf(yyout,"state %d\n",yystate-yysvec-1); # endif yyt = yystate->yystoff; - if(yyt == yycrank){ /* may not be any transitions */ + if(yyt == yycrank && !yyfirst){ /* may not be any transitions */ yyz = yystate->yyother; if(yyz == 0)break; if(yyz->yystoff == yycrank)break; } *yylastch++ = yych = input(); + yyfirst=0; tryagain: # ifdef LEXDEBUG if(debug){