Re: announcing synfl, the next generation of fontlock

Didier Verna <[email protected]> Mon, 24 May 2004 10:29:46 +0200
Newsgroups gmane.emacs.xemacs.design
Message-ID <[email protected]>
Stephen J. Turnbull wrote:

> That should get your attention!
>
> Returning to reason and modesty, this is a rather primitive module based on
> an LR parser engine and an SLR parser generator.

        Funny, I've had a very similar idea in mind for some time. My plan was
to implement an SGLR module to help not only fontification but pretty printing
also. I'm starting to look for the existence of SGL libraries that we could
use (this includes seeing whether it's possible to extract the SGL parser from
the Meta environment and use it). Speaking of Meta, we could also import the
grammar definitions written for it, and translate them into a lispish syntax.

        My investigations on Meta extend farther than that actually. They also
have a functionality that lets you describe statically the pretty-printing
specifications for languages. Imagine we have Lisp static descriptions of
grammars and associated pretty-printing specifications. The idea would then be
to implement a single unified "mode" for font-locking and formatting code in
buffers, instead of having a different mode for each language. This view might
actually be a little too optimistic, but for special cases, I can imagine the
ability to plug-in specific / customized lisp code, much like the way Stratego
in designed on top of the Meta SGLR parser and ATerm library.


        While I'm at it (speaking of real syntactic parsing).

1/ The concept of major-mode is obsolete. I'd like to see a real (read native)
implementation of multi-mode (meta-mode ?) or
whatever-I-dont-remember-the-name-exactly. You know, when the point is within
a C comment, the mode should really be text-mode and so on.

2/ Next step would be incremental parsing. I currently don't have any
knowledge on this matter.


-- 
Didier Verna, [email protected], http://www.lrde.epita.fr/~didier

EPITA / LRDE, 14-16 rue Voltaire   Tel.+33 (1) 44 08 01 85
94276 Le Kremlin-BicĂȘtre, France   Fax.+33 (1) 53 14 59 22   [email protected]