[antlr-interest] xml grammar
Terence Parr
parrt at cs.usfca.edu
Tue Nov 15 10:56:05 PST 2005
On Nov 15, 2005, at 10:51 AM, Oliver Zeigermann wrote:
> Hi Torsten!
>
> 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.
Ter
More information about the antlr-interest
mailing list