[antlr-interest] ANTLR 3 internal error exception

Shmuel Siegel ssiegel at finjan.com
Tue Jan 9 02:21:55 PST 2007


Using antlrwork 1.0b8 on win xp I get the following error when I try to
generate code

 

[10:11:11] error(10):  internal error: C:\Documents and
Settings\ssiegel\My Documents\ANTLR3\alex.g :
java.util.NoSuchElementException: no such attribute: args in template
context [rewriteTokenRef]

 

The easiest reproducible grammar involves introducing an artificial
token in the rewrite rule which uses a token type of the matched
pattern. The following example throws the exception on generation.

 

grammar boo;

 

options

{

            output=AST;

}

 

token

            :           tn='x' ty='string' STRING 

            ->^($tn STRING[$ty])

            ;

            

            

STRING

            :           'y'

            ;

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070109/9030b5ea/attachment.html 


More information about the antlr-interest mailing list