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

David Holroyd dave at badgers-in-foil.co.uk
Sun Aug 13 09:33:44 PDT 2006


On Sun, Aug 13, 2006 at 09:26:59AM -0700, Terence Parr wrote:
> >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).

> 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! ;)

Rightoh.  Well I just tried writing it out the 'long' way...

methodDefinition[AST mods]
	:	'function' (mode='get'|mode='set')? IDENT
		parameterDeclarationList
		typeExpression
		(block)?
		-> ^(METHOD_DEF {$mods}
		                mode? IDENT
				parameterDeclarationList
				typeExpression
				block?)
	;

...and this seems to pacify it.  I'll use that for the moment.


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

ta :)


dave

-- 
http://david.holroyd.me.uk/


More information about the antlr-interest mailing list