[antlr-interest] xml grammar

Torsten Curdt tcurdt at vafer.org
Tue Nov 15 11:18:33 PST 2005


>> You will need something like lexer modes which you can simulate using
>> semantic predicates. In one mode you can match text and in the  
>> other -
>> the tag mode - you will have all those special characters. You will
>> have to switch to that tag mode upon seeing the LT and switch back
>> upon GT.
>
> Hi gang...actually modes are not needed.

> Just call another lexer rule to, for example, match stuff inside  
> the <...> versus outside.
> I think my original HTML grammar did something like this.

I hope I can get away with the provided XML grammar ...but just out
of curiosity - could you explain that a bit ...or give an example? :)

cheers
--
Torsten
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20051115/7bd0ab77/PGP.bin


More information about the antlr-interest mailing list