[antlr-interest] Error: Can't find template tokenRefBang.st Why?

Thomas Brandon tbrandonau at gmail.com
Tue Jan 22 01:32:03 PST 2008


You can't have both AST operators (^ and !) and rewrites in the same rule.
You are using ! in a rule with rewrites. Unfortunately currently the error
message doesn't give the location, this is a known issue. I don't think this
will be fixed in 3.1.

Tom.
On Jan 22, 2008 8:06 PM, Ruslan Zasukhin <sunshine at public.kherson.ua> wrote:

>  Hi,
>
> I run ANTLR from terminal with our SQL parser grammar.
> And get strange error:
>
> Anybody can point reason?
> May be I need try newest betas?
>
> ---------
> ruslans-power-mac-g5:~ rz$ java org.antlr.Tool/PARADIGMA/Developer_2/sources_Third_Party/ANTLR3/VSQL_Parser.g
> ANTLR Parser Generator  Version 3.0.1 (August 13, 2007)  1989-2007
>
> error(10):  internal error:
> /PARADIGMA/Developer_2/sources_Third_Party/ANTLR3/VSQL_Parser.g :
> java.lang.IllegalArgumentException: Can't find template tokenRefBang.st
> org.antlr.stringtemplate.StringTemplateGroup.lookupTemplate(
> StringTemplateGroup.java:485)
> org.antlr.stringtemplate.StringTemplateGroup.getInstanceOf(
> StringTemplateGroup.java:372)
> org.antlr.stringtemplate.StringTemplateGroup.getInstanceOf(
> StringTemplateGroup.java:384)
> org.antlr.codegen.CodeGenTreeWalker.getTokenElementST(
> CodeGenTreeWalker.java:160)
> org.antlr.codegen.CodeGenTreeWalker.atom(CodeGenTreeWalker.java:1965)
> org.antlr.codegen.CodeGenTreeWalker.element(CodeGenTreeWalker.java:1641)
> org.antlr.codegen.CodeGenTreeWalker.element(CodeGenTreeWalker.java:1490)
> org.antlr.codegen.CodeGenTreeWalker.alternative(CodeGenTreeWalker.java
> :1252)
> org.antlr.codegen.CodeGenTreeWalker.block(CodeGenTreeWalker.java:1037)
> org.antlr.codegen.CodeGenTreeWalker.rule(CodeGenTreeWalker.java:753)
> org.antlr.codegen.CodeGenTreeWalker.rules(CodeGenTreeWalker.java:544)
> org.antlr.codegen.CodeGenTreeWalker.grammarSpec(CodeGenTreeWalker.java
> :486)
> org.antlr.codegen.CodeGenTreeWalker.grammar(CodeGenTreeWalker.java:333)
> org.antlr.codegen.CodeGenerator.genRecognizer(CodeGenerator.java:406)
> org.antlr.Tool.processGrammar(Tool.java:347)
> org.antlr.Tool.process(Tool.java:268)
> org.antlr.Tool.main(Tool.java:70)
>
>
>
> --
> Best regards,
>
> Ruslan Zasukhin
> VP Engineering and New Technology
> Paradigma Software, Inc
>
> Valentina - Joining Worlds of Information
> http://www.paradigmasoft.com
>
> [I feel the need: the need for speed]
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080122/cbd18cf4/attachment.html 


More information about the antlr-interest mailing list