URI:
       tMake yacc and lex more pedant friendly. - plan9port - [fork] Plan 9 from user space
  HTML git clone git://src.adamsgaard.dk/plan9port
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
   DIR commit 787a5a559bfe44f61fb52e90873cfb6096eb9f65
   DIR parent 7bda1456a83b25adde0b2415b997766bfeca6f12
  HTML Author: wkj <devnull@localhost>
       Date:   Sun, 16 May 2004 08:08:13 +0000
       
       Make yacc and lex more pedant friendly.
       
       Diffstat:
         M lib/lex/ncform                      |       7 +++++++
         M lib/yaccpars                        |       1 +
       
       2 files changed, 8 insertions(+), 0 deletions(-)
       ---
   DIR diff --git a/lib/lex/ncform b/lib/lex/ncform
       t@@ -11,6 +11,7 @@ int yyprevious = YYNEWLINE;
        # ifdef LEXDEBUG
        extern void allprint(char);
        # endif
       +int
        yylook(void){
                struct yysvf *yystate, **lsp;
                struct yywork *yyt;
       t@@ -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);
       t@@ -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
   DIR diff --git a/lib/yaccpars b/lib/yaccpars
       t@@ -184,6 +184,7 @@ yydefault:
                                        printf("%s", yystatname(yystate));
                                        printf("saw %s\n", yytokname(yychar));
                                }
       +                goto yyerrlab;
        yyerrlab:
                                yynerrs++;