[antlr-interest] How to subtract/and two lexer rules in ANTLR v3.0

Sandeep Gupta sandy.pec at gmail.com
Tue Aug 8 06:45:33 PDT 2006


Hi Kay

I am referring to the XML Specifications ver 3.0 at the URL
http://www.w3.org/TR/REC-xml. Please refer to the sections 2.5 and 2.6 for
comments and the PI (article [15] and [16]). I am trying to parse a DTD and
generate an AST. The exercise I am doing is just for practice and gaining
experience with parsing stuff.

By meaning of subtract, I mean that if we have a SET1 of say letters
'a'..'z' | 'A'..'Z' and say SET2 of capital letters 'A'..'Z'. Now if I want
to have small letter set SET# then I want to achieve
SET3 = SET1 - SET2;
instead of writing the whole SET3 = 'a'..'z' It would be particularly useful
when we want to use Unicode Character Sets applicable in the input stream.

I hope I am able to express it better this time.



Sandeep Gupta
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20060808/1ae9fcad/attachment.html


More information about the antlr-interest mailing list