[antlr-interest] Simple Antlr3 grammar not working inAntlrWorks 1.0b9

Shmuel Siegel ssiegel at finjan.com
Tue Mar 27 05:38:15 PDT 2007


I tried using the new antlr.jar and the new stringtemplate with the
antlr3 ant task. A grammar that used to work now gives these errors from
the antlr build. Has the syntax of the language changed? Or maybe I
needed other environment changes.

ARB:
     [echo] antlr C:\Finjan\ARB3\grammar/ARB.g
[antlr:antlr3] ANTLR Parser Generator  Version 3.0b7 (??, 2007)
1989-2007
[antlr:antlr3] two-threaded DFA conversion
[antlr:antlr3] error(100): C:\Finjan\ARB3\grammar\ARB.g:0:0: syntax
error: buildnfa: <AST>:1385:10: unexpected AST node: BLOCK


-----Original Message-----
From: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org] On Behalf Of Terence Parr
Sent: Tuesday, March 27, 2007 3:37 AM
To: ANTLRDev Interest
Subject: Re: [antlr-interest] Simple Antlr3 grammar not working
inAntlrWorks 1.0b9

Fixed this bug.  Added unit test.  New antlr build.

http://www.antlr.org:8888/browse/ANTLR-96

Build: antlr-03-26-2007.18.tar.gz

fixes:

* CommonTreeNodeStream didn't push correctly; couldn't handle very
   deeply nested trees.

* Fixed bug that E : 'a' 'b' ; made E be seen as an alias of 'a'.

Ter

On Mar 15, 2007, at 8:00 AM, Shmuel Siegel wrote:

> Consider
>
>  grammar boo;
>
>  sentence
>
>             :           'abc' 'x'
>
>             | Item
>             ;
> Item: 'x' '0' '9' ;
>
>
>
> "sentence" doesn't match abcx but does match abcx09. The grammar  
> works properly if I rewrite "Item" as
>
>
>
> Item: 'x09' ;




More information about the antlr-interest mailing list