bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Latest set of patches to the java-push branch


From: Akim Demaille
Subject: Re: Latest set of patches to the java-push branch
Date: Fri, 21 Jun 2013 11:40:19 +0200

Le 13 juin 2013 à 18:13, Dennis Heimbigner <address@hidden> a écrit :

> Actually ignore last meesages. I trust my
> test cases enough that if they are passing
> then it is ok, so go ahead and push.


hi Dennis,

I'd like to understand why you reset yyerrstatus
in the push-parser wrapper that provide the usual
pull interface.  I'm suggesting the following change.
Actually, it is requested by the test suite.

The test suite is designed to run pull parser tests in
push mode with pull emulation.  In other words, any test
run for regular pull parsers is run another time, but with
a push parser.  This is run via

        make maintainer-push-check

For instance run:

$ make check TESTSUITEFLAGS='-d 388 BISON_USE_PUSH_FOR_PULL=1 -v -x'            
                                   

and you'll see that there are two parse error messages instead of
only one:

--- expout      2013-06-21 11:10:10.000000000 +0200
+++ 
/Users/akim/src/gnu/bison/_build/48d-debug/tests/testsuite.dir/at-groups/388/stdout
 2013-06-21 11:10:10.000000000 +0200
@@ -1 +1,2 @@
 1.3: syntax error, unexpected '/', expecting number or '-' or '(' or '!'
+1.4: syntax error, unexpected number, expecting '\n'
388. java.at:360:  FAILED (java.at:360)

Also, why did you name your special value YYMORE?  In C, it is named
YYPUSH_MORE.  I can understand why you chose the shorter name, yet
I try to keep Bison consistent.

commit 1d678854a43d4156e28f47942fcd69adfa04ca96
Author: Akim Demaille <address@hidden>
Date:   Fri Jun 21 11:17:05 2013 +0200

    java: push: do not reset the error counter
    
    * data/lalr1.java (parse): here, when in push-pull is in "both" mode.
    This breaks the test suite, for instance
    make check TESTSUITEFLAGS='-d 388 BISON_USE_PUSH_FOR_PULL=1'.
    More generally make maintainer-push-check.

diff --git a/data/lalr1.java b/data/lalr1.java
index d226ce3..1598823 100644
--- a/data/lalr1.java
+++ b/data/lalr1.java
@@ -899,7 +899,6 @@ b4_both_if([[
 ]b4_locations_if([dnl
         b4_location_type yyloc = new b4_location_type (yylexer.getStartPos (),
                                               yylexer.getEndPos ());])[
-        this.yyerrstatus_ = 0;
         ]b4_locations_if([status = push_parse(token,lval,yyloc);],[
         status = push_parse(token,lval);])[
       } while (status == YYMORE);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]