[antlr-interest] antlr exception when adding rewrite
Jim Idle
jimi at temporal-wave.com
Fri Aug 17 09:26:02 PDT 2007
Doesn't this usually happen when you try to mix rewrites with the
rewrite operators? For instance if you have ^ or ! in your rule spec,
then add a -> rule as well. Look for that and take out the ^ and ! if
you have them in the rule and are also trying to rewrite it.
It may well be something different of course, but that is the usual
issue.
Jim
> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of Andy Tripp
> Sent: Friday, August 17, 2007 8:55 AM
> To: Terence Parr
> Cc: antlr-interest
> Subject: Re: [antlr-interest] antlr exception when adding rewrite
>
> I do have output=AST already.
>
> Terence Parr wrote:
> > add output=AST option
> > Ter
> > On Aug 17, 2007, at 8:46 AM, Andy Tripp wrote:
> >
> >> When I have this parser rule:
> >>
> >> guid:
> >> '{' ~('}')* '}'
> >> ;
> >>
> >> ...when I try to add any sort of rewrite rule, such as just "->" or
> >> "->^(WHATEVER)",
> >> I get the following exception when running antlr.
> >> Is this an ANTLR bug?
> >>
> >>
> >> ANTLR Parser Generator Version 3.0 (May 17, 2007) 1989-2007
> >> error(10): internal error: VB.g :
> >> java.lang.IllegalArgumentException: Can't find template
> matchSetTrack.st
> >>
>
org.antlr.stringtemplate.StringTemplateGroup.lookupTemplate(StringTempl
> ateGroup.java:485)
More information about the antlr-interest
mailing list