[antlr-interest] gUnit 1.0.2 updated

Leon Su leon.antlr at mac.com
Fri Feb 8 20:34:14 PST 2008


Hi Mark,

Thanks for pointing out this. When testing a start rule (output=AST),  
gUnit will
get the nil node generated from ANTLR which represents a list of  
subtrees.
The outermost parentheses are not displayed currently.
I'll add this to the next release. Sorry for the inconvenience.

Leon

On Feb 8, 2008, at 6:40 PM, Mark Volkmann wrote:

> On Feb 8, 2008 6:28 PM, Leon Su <leon.antlr at mac.com> wrote:
>> Hi,
>>
>> gUnit 1.0.2 is available on the wiki (attachment page):
>> http://www.antlr.org/wiki/display/ANTLR3/gUnit+-+Grammar+Unit+Testing
>> It's compatible with the latest antlr-2008-01-23.10.
>
> Thank you so much Leon! I've been waiting for this.
>
> Is there a trick to testing the start rule which generates the topmost
> AST containing the nil root element supplied by ANTLR?
>
> Here's the rule I'm testing.
>
> script: NEWLINE? statement*;
>
> statement is a rule that ends in terminator.
> terminator can be a NEWLINE or EOF.
>
> Here's the test that isn't working.
>
> script:
> <<
> a = 19
> list variables
>>> -> ((= a 19) (list variables))
>
> I get the following output.
>
> 1 failures found:
> test13 (script) -
> expected: ((= a 19) (list variables))
> actual:
>  (= a 19) (list variables)
>
> -- 
> R. Mark Volkmann
> Object Computing, Inc.



More information about the antlr-interest mailing list