[antlr-interest] Can't find template tokenRefBangTrack.st

Terence Parr parrt at cs.usfca.edu
Sun Aug 13 09:26:59 PDT 2006


On Aug 13, 2006, at 9:17 AM, David Holroyd wrote:

> On Sat, Aug 12, 2006 at 06:57:46PM +0000, David Holroyd wrote:
>> however I still get the "Can't find template matchSetTrack.st" error.
>
> I've been digging around, trying to delete various bits of the  
> grammar to
> make the error go away.  On a whim I deleted all the -> rewrite rules,
> and the error changed.  So, I've just been going though putting them
> back a few at a time trying to see which one causes the error.
>
> Seems it was this production:
>
> methodDefinition[AST mods]
> 	:	'function' ('get'|'set')? IDENT
> 		parameterDeclarationList
> 		typeExpression
> 		(block)?
> 		-> ^(METHOD_DEF {$mods} $methodDefinition)
> 	;
>
> If I remove the rewrite rule, I don't get the "Can't find template
> matchSetTrack.st" error (however I get a different error, related  
> to the
> lexer code gen, I think).
>
> Can anyone point out my mistake?

Hi David, great debugging work.  Yes, this is another "to do" item.   
Tracking sets ('get'|'set').  When you use -> it tracks all of the  
stuff on the left even if not ref'd (optimization to be done later).   
sorry bout that.  I should be back sort of off vacation tomorrow.   
The impending storm clouds of the Fall semester are descending upon  
me! ;)

Great work on the v2->v3 page, btw!

Ter


More information about the antlr-interest mailing list