Fix huge bug in lex, introduced by porting.
Surprising that anything worked.
This commit is contained in:
parent
d16cfe2431
commit
e3e30cff40
1 changed files with 3 additions and 3 deletions
|
|
@ -84,8 +84,8 @@ phead1(void)
|
||||||
void
|
void
|
||||||
phead2(void)
|
phead2(void)
|
||||||
{
|
{
|
||||||
Bprint(&fout,"while((nstr = yylook()) >= 0)\n");
|
Bprint(&fout,"while((nstr = yylook()) >= 0){\n");
|
||||||
Bprint(&fout,"goto yyfussy;\nyyfussy: switch(nstr){\n");
|
Bprint(&fout,"goto yyfussy; yyfussy: switch(nstr){\n");
|
||||||
Bprint(&fout,"case 0:\n");
|
Bprint(&fout,"case 0:\n");
|
||||||
Bprint(&fout,"if(yywrap()) return(0); break;\n");
|
Bprint(&fout,"if(yywrap()) return(0); break;\n");
|
||||||
}
|
}
|
||||||
|
|
@ -97,7 +97,7 @@ ptail(void)
|
||||||
Bprint(&fout,"case -1:\nbreak;\n"); /* for reject */
|
Bprint(&fout,"case -1:\nbreak;\n"); /* for reject */
|
||||||
Bprint(&fout,"default:\n");
|
Bprint(&fout,"default:\n");
|
||||||
Bprint(&fout,"fprintf(yyout,\"bad switch yylook %%d\",nstr);\n");
|
Bprint(&fout,"fprintf(yyout,\"bad switch yylook %%d\",nstr);\n");
|
||||||
Bprint(&fout,"} return(0); }\n");
|
Bprint(&fout,"}} return(0); }\n");
|
||||||
Bprint(&fout,"/* end of yylex */\n");
|
Bprint(&fout,"/* end of yylex */\n");
|
||||||
}
|
}
|
||||||
pflag = 1;
|
pflag = 1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue