bug-bison
[Top][All Lists]
Advanced

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

Re: bison-3.0.4 released [stable]


From: Akim Demaille
Subject: Re: bison-3.0.4 released [stable]
Date: Tue, 10 Feb 2015 15:04:12 +0100

> Le 10 févr. 2015 à 13:55, Michael Felt <address@hidden> a écrit :
> 
> address@hidden:[/data/prj/gnu/bison/bison-3.0.4.4]cat 
> tests/test*.dir/???/testsuite.log
> #                             -*- compilation -*-
> 95. output.at:264: testing Output file name: 
> address@hidden&*()-=_+{}[]|\:;<>, .' ...
> ./output.at:264: touch "address@hidden&*()-=_+{}[]|\\:;<>, .'.tmp" || exit 77
> ./output.at:264: bison -fno-caret -o "address@hidden&*()-=_+{}[]|\\:;<>, 
> .'.c" --defines="address@hidden&*()-=_+{}[]|\\:;<>, .'.h" glr.y
> ./output.at:264: ls "address@hidden&*()-=_+{}[]|\\:;<>, .'.c" 
> "address@hidden&*()-=_+{}[]|\\:;<>, .'.h"
> stdout:
> address@hidden&*()-=_+{}[]|\:;<>, .'.c
> address@hidden&*()-=_+{}[]|\:;<>, .'.h
> ./output.at:264: $BISON_C_WORKS
> stderr:
> stdout:
> ./output.at:264: $CC $CFLAGS $CPPFLAGS -c -o glr.o -c 
> "address@hidden&*()-=_+{}[]|\\:;<>, .'.c" 
> stderr:
> stdout:
> ./output.at:264: bison -fno-caret -o "address@hidden&*()-=_+{}[]|\\:;<>, 
> .'.cc" --defines="address@hidden&*()-=_+{}[]|\\:;<>, .'.hh" cxx.y
> ./output.at:264: ls "address@hidden&*()-=_+{}[]|\\:;<>, .'.cc" 
> "address@hidden&*()-=_+{}[]|\\:;<>, .'.hh"
> stdout:
> address@hidden&*()-=_+{}[]|\:;<>, .'.cc
> address@hidden&*()-=_+{}[]|\:;<>, .'.hh
> ./output.at:264: $BISON_CXX_WORKS
> stderr:
> stdout:
> ./output.at:264: $CXX $CXXFLAGS $CPPFLAGS -c -o cxx.o -c 
> "address@hidden&*()-=_+{}[]|\\:;<>, .'.cc" 
> stderr:
>     1500-004: (U) INTERNAL COMPILER ERROR while compiling 
> yy::parser::~parser().  Compilation ended.  Contact your Service 
> Representative and provide the following information: Internal abort. For 
> more information visit: http://www.ibm.com/support/docview.wss?uid=swg21110810
> stdout:
> ./output.at:264: exit code was 1, expected 0

This one should really be reported to your compiler vendor.



> 464. javapush.at:614: testing Calc parser with %locations %code lexer and 
> api.push-pull both ...
> ./javapush.at:866: bison -fno-caret -Dapi.push-pull=both -o Calc.java Calc.y
> ./javapush.at:867: $SHELL ../../../javacomp.sh Calc.java
> stderr:
> Calc.java:1245: cannot resolve symbol
> symbol  : class StringBuilder 
> location: class Calc
>     StringBuilder buf = new StringBuilder();
>     ^

Bummer... There was another place where this piece of code was
used :(

Well, I tried the opposite approach, this time it should work.

http://www.lrde.epita.fr/~akim/private/bison-3.0.4.4-a668.tar.gz


commit 3d75e7de1e01610a4be1b4d7e08f0df015c89b71
Author: Akim Demaille <address@hidden>
Date:   Tue Feb 10 14:56:01 2015 +0100

    tests: java: avoid recent Java features
    
    Tests 463 and 464 fail with Java 1.4 compilers.
    
    Reported by Michael Felt.
    <http://lists.gnu.org/archive/html/bug-bison/2015-01/msg00091.html>
    
    * tests/javapush.at: Use StringBuffer instead of StringBuilder.

diff --git a/tests/javapush.at b/tests/javapush.at
index 28e6947..dcac4f9 100644
--- a/tests/javapush.at
+++ b/tests/javapush.at
@@ -241,10 +241,13 @@ m4_define([AT_CALC_BODY],[
   static StringReader
   getinput(String filename) throws IOException
   {
-    StringBuilder buf = new StringBuilder();
+    // Yes, there are better alternatives to StringBuffer.  But we
+    // don't really care about performances here, while portability
+    // to older Java matters.
+    StringBuffer buf = new StringBuffer();
     FileReader file = new FileReader(filename);
     int c;
-    while ((c=file.read()) > 0)
+    while (0 < (c = file.read()))
       buf.append((char)c);
     file.close();
     return new StringReader(buf.toString());
@@ -302,6 +305,13 @@ exp:
 ;
 ])
 
+
+
+## ------------------------------------- ##
+## Calc parser with api.push-pull both.  ##
+## ------------------------------------- ##
+
+
 # Test that the states transitioned by the push parser are the
 # same as for the pull parser.  This test is assumed to work
 # if it produces the same partial trace of stack states as is
@@ -577,8 +587,9 @@ Stack now 0 7 15
 ]])
 
 AT_BISON_CHECK([PUSHPULLFLAG [-o Calc.java Calc.y]])
+
 AT_JAVA_COMPILE([[Calc.java]])
-#Verify that this is a push parser.
+# Verify that this is a push parser.
 AT_CHECK_JAVA_GREP([[Calc.java]],
                    [[.*public void push_parse_initialize().*]])
 # Capture stderr output for comparison purposes.
@@ -593,6 +604,13 @@ AT_CHECK([[sed -e '/^Stack now.*$/p' -e d ./stderr]],
 AT_BISON_OPTION_POPDEFS
 AT_CLEANUP
 
+
+
+## ---------------------------------------------------------------- ##
+## Calc parser with %locations %code lexer and api.push-pull both.  ##
+## ---------------------------------------------------------------- ##
+
+
 # This test looks for location reporting by looking
 # at the lexer output with locations enabled.
 # It defines a lexer that reports location info.




reply via email to

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