[antlr-interest] template % question.
craig at palantir.co.za
craig at palantir.co.za
Wed Sep 16 00:55:06 PDT 2009
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.
More information about the antlr-interest
mailing list