[antlr-interest] gunit failing on update to ANTLR 3.3

Terence Parr parrt at cs.usfca.edu
Sun Jun 19 11:30:58 PDT 2011


Ok, looked into this.  3.2 and 3.4 seems to work but 3.3 doesn't. weird.  anyway here is what i see:

/tmp/gunit $ java -cp ".:/usr/local/lib/antlr-3.2.jar" org.antlr.gunit.Interp SimpleC.gunit
-----------------------------------------------------------------------
executing testsuite for grammar:SimpleC with 1 tests
-----------------------------------------------------------------------
0 failures found:
Tests run: 1, Failures: 0



/tmp/gunit $ java -cp ".:/usr/local/lib/antlr-3.3-complete.jar:$CLASSPATH" org.antlr.gunit.Interp SimpleC.gunit
-----------------------------------------------------------------------
executing testsuite for grammar:SimpleC with 1 tests
-----------------------------------------------------------------------
1 failures found:
test1 (program, line6) - 
expected: OK
actual: FAIL


Tests run: 1, Failures: 1




$ java -cp ".:/usr/local/lib/antlr3-main.jar:$CLASSPATH" org.antlr.gunit.Interp SimpleC.gunit
-----------------------------------------------------------------------
executing testsuite for grammar:SimpleC with 1 tests
-----------------------------------------------------------------------
0 failures found:
Tests run: 1, Failures: 0

So, 3.4 seems to have fixed it.  releasing 3.4 today or tomorrow as beta.

Ter
On Jun 14, 2011, at 5:57 PM, Simon Marchi wrote:

> Ping !
> 
> On Mon, Jun 6, 2011 at 19:52, Terence Parr <parrt at cs.usfca.edu> wrote:
>> hi guys. at a conference for another day or two. if no response this
>> week, ping me!
>> 
>> a simple grammar / gunit test that fails should yield a quick fix :)
>> 
>> Ter
>> On Jun 6, 2011, at 4:47 PM, Simon Marchi wrote:
>> 
>>> I also have experienced some strange behavior with gunit, although it
>>> is the first time I use it. I sent a message about this on May 20
>>> (http://www.antlr.org/pipermail/antlr-interest/2011-May/041650.html)
>>> and have seen one or two other on the same subject. I would really
>>> like a follow-up on this !
>>> 
>>> Thanks,
>>> 
>>> Simon
>>> 
>>> On Mon, Jun 6, 2011 at 08:32, Jasper Floor <jasperfloor at gmail.com>
>>> wrote:
>>>> Dear All,
>>>> 
>>>> I have a small DSL for the company I work for. I have used gunit to
>>>> make some tests. I also have my own tests next to this but operating
>>>> on a higher level.
>>>> 
>>>> I recently made a small change to the language and decided to update
>>>> Antlr to the latest version.
>>>> 
>>>> Unfortunately most of my (g)unit tests broke.
>>>> 
>>>> The reason in one case is that the following test (the first test in
>>>> the file for whatever that is worth):
>>>> 
>>>> "$1=#1;" OK
>>>> 
>>>> Does not return OK. The output says parsing stopped at character 4.
>>>> Tracing through the generated junit code I found out that the return
>>>> value is not OK but the AST. So the test should pass with OK.
>>>> This isn't consistent however. Or rather. FAIL seems to work and
>>>> some AST pass.
>>>> 
>>>> All tests pass with antlr 3.2. They also pass my own test suite which
>>>> tests at a higher level from gunit.
>>>> This implies a problem with gunit.
>>>> 
>>>> mvg,
>>>> Jasper
>>>> 
>>>> List: http://www.antlr.org/mailman/listinfo/antlr-interest
>>>> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>>>> 
>>> 
>>> List: http://www.antlr.org/mailman/listinfo/antlr-interest
>>> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>> 
>> 
>> List: http://www.antlr.org/mailman/listinfo/antlr-interest
>> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>> 



More information about the antlr-interest mailing list