Why is font-lock needed for a mode based on Semantic CFG parser?
Left Right <[email protected]>
| Newsgroups | gmane.emacs.cedet |
|---|---|
| Message-ID | <CAJQBtgnXQdw+PgoLYBhYBFGX-aA1vThN+c0rjtZw7_GF5DP4mA@mail.gmail.com> |
Hi list, Please excuse me, if I'm asking something obvious, but this question bothered me since I've red the guide for making a mode that uses Semantic. It says that I need to handle font-lock on my own, which, as far as I can understand uses parsing system based on regular expressions. It feels self-defeating to have a real CFG parser with proper syntax analysis and still rely on regular expressions for coloring. So, my question is: why, and if really, isn't it possible to employ Semantic for syntax highlighting as well as completion / syntax checking / navigation. Do I need font-lock mode for Semantic to work (properly)? If I may guess: is this because during editing the edited region may not be syntactically valid and it is hard / not possible / too costly at the moment to deal with it using Semantic? Thanks, Oleg ------------------------------------------------------------------------------ Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds