[antlr-interest] Building syntax highlighters with ANTLR
Terence Parr
parrt at cs.usfca.edu
Thu Apr 9 10:56:06 PDT 2009
Let's hear the details, Sam! :)
Ter
On Apr 9, 2009, at 1:38 AM, Sam Harwell wrote:
> I’ve made a few posts about this in the past, and it looks like
> another one is on the way. I designed a new, much easier, robust,
> and general way to make a syntax highlighter from a grammar, and it
> even allows clean “stacking” of lexers. As a quick example, my
> primary grammar recognizes a block comment, but it doesn’t recognize
> Doxygen syntax within that comment. By stacking a Doxygen-style
> fragment lexer in the colorizer, and telling it to post-process any
> token of primary type “DOC_COMMENT”, I ended up with this.
>
> I’d give the gory details now, but it’s 3:30am – just had to share
> because figuring this out is what kept me up! I can’t wait to see
> multi-level lexer stacking for my StringTemplate highlighter. J
>
> <image001.png>
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
More information about the antlr-interest
mailing list