commit 787a5a559bfe44f61fb52e90873cfb6096eb9f65 from: wkj date: Sun May 16 08:08:13 2004 UTC Make yacc and lex more pedant friendly. commit - 7bda1456a83b25adde0b2415b997766bfeca6f12 commit + 787a5a559bfe44f61fb52e90873cfb6096eb9f65 blob - a87030b354bd5195e1dec34b27d92e48ed0065d1 blob + 6571735b4ce14ea2ae4ed3d5aee6eda81f69174d --- lib/lex/ncform +++ lib/lex/ncform @@ -11,6 +11,7 @@ int yyprevious = YYNEWLINE; # ifdef LEXDEBUG extern void allprint(char); # endif +int yylook(void){ struct yysvf *yystate, **lsp; struct yywork *yyt; @@ -158,6 +159,7 @@ yylook(void){ } return(0); /* shut up the compiler; i have no idea what should be returned */ } +int yyback(int *p, int m) { if (p==0) return(0); @@ -169,12 +171,17 @@ while (*p) return(0); } /* the following are only used in the lex library */ +int yyinput(void){ + if(yyin == ((void*)0)) + yyin = stdin; return(input()); } void yyoutput(int c) { + if(yyout == ((void*)0)) + yyout = stdin; output(c); } void blob - 6e96a20623148ef2ec02d7b290688f88f8759552 blob + be83835e512b0bc2d9f67b49991299cc7d116c6e --- lib/yaccpars +++ lib/yaccpars @@ -184,6 +184,7 @@ yydefault: printf("%s", yystatname(yystate)); printf("saw %s\n", yytokname(yychar)); } + goto yyerrlab; yyerrlab: yynerrs++;