[antlr-interest] XPath 1 Grammar in V3 b6

Alex Milowski alexml at milowski.com
Fri Mar 2 08:39:02 PST 2007

I've been attempting to write an XPath 1.0 grammar in prep for an
XPath 2.0grammar.  I
keep running into compile errors where 'UP' and 'DOWN' tokens that do not
in my grammar are generated somehow.  This particular grammar also has
with expressions like 'foo and bar' that I just can't quite figure out.

I've always liked antlr but I think this latest attempt has gotten the best
of me and
I've given up for now and just hand wrote the parser.  If anyone can give me
few pointers, that'd be great.

I attached the grammar and a test program.

One thing that would be really helpful is more complete documentation on the
V3 grammar itself.  The wiki has been useful but I found myself going into
V2 documentation a lot and then trying to figure out what has translated to

--Alex Milowski
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070302/cc8e8b5d/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: XPath1.g
Type: application/octet-stream
Size: 9178 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20070302/cc8e8b5d/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ViewAST.java
Type: text/x-java
Size: 1523 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20070302/cc8e8b5d/attachment.bin 

More information about the antlr-interest mailing list