all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "spamfilteraccount@gmail.com" <spamfilteraccount@gmail.com>
Subject: Re: State-machine based syntax highlighting
Date: 8 Dec 2006 13:14:42 -0800	[thread overview]
Message-ID: <1165612482.201274.57760@j44g2000cwa.googlegroups.com> (raw)
In-Reply-To: <1165594639.164156.286660@f1g2000cwa.googlegroups.com>


Robert Thorpe wrote:
>
> Doing this with normal parsing technology is difficult.  If the editor
> just feeds every file into the external parser then back into the
> editor then this will be a lot of work.

Yes, this is a problematic part. I was thinking about feeding only code
snippets to the external parser, but even determining what snippet
should be fed from the current source code would need some kind of
parsing, so using external parsers might not be feasible after all.

> Compiler parsers and font-locking/navigating code have different
> intentions.  Compiler parsers must be fast when handling a whole file,
> and they must generate accurate error messages.  Font-locking code must
> be fast when starting at any arbitrary part of the code, and it must
> tolerate incomplete information and errors.

Of course, and I wasn't thinking of using the existing compiler as is,
rather utilizing somehow the existing infrastructure in the compiler if
it's accessible to implement partial parsing. But given the problems
discussed above it may not be the way to go.

If parsing needs to be implemented in the editor and every editor must
have it's own implementation then at least the concepts could be
shared.

I mean there should be a wiki or something about discussing issues of
partial parsing for a particular language (java, c++, etc.), instead of
everyone reinventing the wheel differently.

For example, one could check the current implementation in Eclipse of
java code completion and parsing, before embarking to implement the
same thing again and the same goes for other open source editors
supporting other languages.

  reply	other threads:[~2006-12-08 21:14 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
2006-12-08  8:36                       ` spamfilteraccount
2006-12-08 16:17                         ` Robert Thorpe
2006-12-08 21:14                           ` spamfilteraccount [this message]
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

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

  git send-email \
    --in-reply-to=1165612482.201274.57760@j44g2000cwa.googlegroups.com \
    --to=spamfilteraccount@gmail.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.