unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Robert Thorpe" <rthorpe@realworldtech.com>
Subject: Re: State-machine based syntax highlighting
Date: 7 Dec 2006 04:42:44 -0800	[thread overview]
Message-ID: <1165495364.560960.271250@f1g2000cwa.googlegroups.com> (raw)
In-Reply-To: <1165492567.864982.59980@79g2000cws.googlegroups.com>

spamfilteraccount@gmail.com wrote:
> Robert Thorpe wrote:
> >
> > In my view the real way to improve Emacs syntax highlighting would be
> > to make it based on parsing.
> >
>
> Yes, it could be better, though in this case emacs would rely on
> external tools doing the actual parsing, because I don't think the
> syntax parsing of every language should be reimplemented in elisp.
>
> That's not a big deal, since if I need to work with c files then
> usually have the c compiler installed.

No, it would probably have to be reimplemented inside Emacs.
There are many differences between parsing an language in order to
compile it and parsing a language in order to perform syntax
highlighting and movement commands.

In the later case you have to be able to tolerate expressions near to
point that are incorrectly formatted because the user is still typing
them.  Also you have to be able to trigger the process from any given
point, so that if the user jumps from line 1 to line 5794 you don't
have to parse everything in the intervening code.  Also, when
highlighting you don't care about the contents of the code much.

The Emacs "Semantic" package already does much of this, so do some
other editors.

  reply	other threads:[~2006-12-07 12:42 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 [this message]
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
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=1165495364.560960.271250@f1g2000cwa.googlegroups.com \
    --to=rthorpe@realworldtech.com \
    /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).