[antlr-interest] ANTLR lexer vs. JFace RuleBasedScanner

Martin Probst mail at martin-probst.com
Thu Dec 22 01:25:37 PST 2005


> For syntax highlighting I'm at a loss. What is not obvious to me is
> how to avoid the PresentationReconciler, or at least make it use my
> scan/parse already performed.

As far as I understand that underdocumented and overcomplicated API, you
can't. They consider reconciling and text highlighting to be two
completely different things (which might actually be a sane decision).
You can however implement the Scanner interface and return tokens
wrapping the ANTLR tokens.

> Can someone point me to an example where ANTLR is used for syntax
> highlighting in an Eclipse TextEditor project? Thanks.

I guess ANTLREclipse does?

Martin



More information about the antlr-interest mailing list