unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Tim X <timx@nospam.dev.null>
Subject: Re: State-machine based syntax highlighting
Date: Fri, 08 Dec 2006 19:10:30 +1100	[thread overview]
Message-ID: <87psaukdu1.fsf@lion.rapttech.com.au> (raw)
In-Reply-To: 1165563183.140436.326110@16g2000cwy.googlegroups.com

"spamfilteraccount@gmail.com" <spamfilteraccount@gmail.com> writes:

> Robert Thorpe wrote:
>>
>> If parsing were to be used to support syntax highlighting then maybe
>> some work would have to be done to avoid having to use Elisp.  But I'm
>> not sure since it would still require loads of regexps and they would
>> probably still eat up a lot of the runtime.
>>
>
> That may be true, but the advantage is that parsing actually
> understands code, not just matches it with some regexps, so it could be
> used for much more than syntax highlighting (some kind of error
> checking, code completion, etc.).
>
> I think if there are already parsers written in elisp they should be
> intergrated into the official emacs distribution (e.g. in directory
> lisp/parsers), so that packages can use them to understand the code
> better.
>

Have a look at 

http://cedet.sourceforge.net/

The combination of semantic and cedet is, amongst other things, aimed
at providing parse based functionality for emacs. some of this is (I
think) going to be bundled in with emacs 22. The idea is to provide a
more powerful devleopment environment that can do things like code
completion based on more than just abbrevs and dynamic completion
based on recently used keywords and regexp. 

The problem with parse based analysis is that you need an in-built
parser for all the languages that the editor is used to develop in and
this is not a trivial task. I suspect some sort of plugin architecture
that is able to use stand-alone parses for some language of interest
would probably be the way to go as it is unlikely even a small subset
of the languages devleoped within an emacs environment can have a
parser developed in elisp which is readily maintained.

Tim
-- 
tcross (at) rapttech dot com dot au

  reply	other threads:[~2006-12-08  8:10 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-07  6:14 State-machine based syntax highlighting spamfilteraccount
2006-12-07 10:53 ` Robert Thorpe
2006-12-07 11:56   ` spamfilteraccount
2006-12-07 12:42     ` Robert Thorpe
2006-12-07 14:27       ` spamfilteraccount
2006-12-07 14:39         ` Robert Thorpe
2006-12-07 17:02           ` spamfilteraccount
2006-12-07 17:42             ` Stefan Monnier
     [not found]             ` <mailman.1644.1165513359.2155.help-gnu-emacs@gnu.org>
2006-12-07 18:35               ` spamfilteraccount
2006-12-07 18:57                 ` Robert Thorpe
2006-12-07 20:24                   ` Perry Smith
2006-12-08  7:33                   ` spamfilteraccount
2006-12-08  8:10                     ` Tim X [this message]
2006-12-08  8:36                       ` spamfilteraccount
2006-12-08 16:17                         ` Robert Thorpe
2006-12-08 21:14                           ` spamfilteraccount
2006-12-09  2:08                             ` Stefan Monnier
2006-12-09  2:06                           ` Stefan Monnier
2006-12-09  3:24                             ` Lennart Borgman
2006-12-08 13:14                       ` Leo
2006-12-08 14:00                       ` Robert Thorpe
2006-12-09  2:10                         ` Stefan Monnier
     [not found]                       ` <mailman.1672.1165586758.2155.help-gnu-emacs@gnu.org>
2006-12-08 14:17                         ` Robert Thorpe
2006-12-08 21:17                       ` spamfilteraccount
     [not found]                   ` <mailman.1653.1165523111.2155.help-gnu-emacs@gnu.org>
2006-12-08 10:01                     ` Robert Thorpe
2006-12-07 19:02                 ` Stefan Monnier
2006-12-07 19:29                   ` spamfilteraccount
2006-12-08 14:43                     ` Robert Thorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87psaukdu1.fsf@lion.rapttech.com.au \
    --to=timx@nospam.dev.null \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).