[antlr-interest] template % question.
Jim Idle
jimi at temporal-wave.com
Wed Sep 16 05:28:13 PDT 2009
I think that this might be a known bug which is fixed in the 3.1.4
snapshot. Download and try that.
If not that bug then something in your grammar that I can't see on my
iphone.
Jim
On Sep 16, 2009, at 12:55 AM, craig at palantir.co.za wrote:
> Hi,
>
> trying to parse the following:
> (The problem is with the template %join)
>
> relativePath
> : ('//'|'/') (ns=QNAME ':')? nm=QNAME
> { $st = %join(table={$QNAME.text}); }
> | dot='.' -> {%{$dot.text}}
> | STRING -> {%{$STRING.text}}
> | '@' qn=QNAME -> {%{$QNAME.text}}
> | cm=comp -> template(c={$cm.st}) "<c>"
> ;
> I get the following error,
>
> error(100): :1:1: syntax error: antlr: XPathSqlTree.g:1:1:
> unexpected token:
> join
> error(10): internal error:
> Exception java.lang.ClassCastException: Unable to cast object of
> type
> 'antlr.CommonToken' to
> type
> 'antlr.TokenWithIndex'. at antlr.TokenStreamRewriteEngine.nextToken
> (TokenStreamRewriteEngine.java:161):
> can't parse template action
>
> what am I doing wrong.
>
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
>
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
More information about the antlr-interest
mailing list