[antlr-interest] V3.0b Internal Error...

Robert Hill rob.hill at blueyonder.co.uk
Mon Oct 9 13:41:44 PDT 2006


I have a rule in my grammar:

sqlTransfer[Service s]
	:   ( Select |  Update | Insert | Delete )
		param=Identifier Using mapping=Identifier Semi 	
	{
			//some Java Code...
	}  
	-> ^(SQLCODE )

Which generates the following

ANTLR Parser Generator   Early Access Version 3.0b4 (??, 2006)  1989-2006
internal error: D:\ActiveProjects\IdeaProjects\Jtest1\src\SGenParser.g :
java.lang.IllegalArgumentException: Can't find template matchSetTrack.st
org.antlr.stringtemplate.StringTemplateGroup.lookupTemplate(StringTemplateGr
oup.java:485)
......

however if I remove the brackets round the first set (select..Delete) the
error goes away.
I'm just trying to get it to emit a branch for this rule, it doesn't matter
what I put in the re-write, I still get the error if the brackets are there.
Also, if I remove the rewrite , the error goes away.
Am I doing something wrong?
Cheers,
Rob






More information about the antlr-interest mailing list