all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Perry Smith <pedzsan@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Wisent Parser for font-lock MATCHERS
Date: Wed, 16 Jan 2008 16:04:09 -0500	[thread overview]
Message-ID: <jwvsl0xbi1o.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <8D4A98C6-75F0-4E60-AE41-0864CD11349A@gmail.com> (Perry Smith's message of "Wed, 16 Jan 2008 12:59:31 -0600")

> My apologies if this questions is not appropriate for this list.

> Strings in ruby are very complex.  They require a PDA and not just a DFA.
> I'm mid-way through writing a function to properly recognize a  ruby string
> but then paused to consider perhaps I should use wisent  instead.  I've not
> used wisent before.  If I'm going down a blind  alley, please let me know.
> Or if there are samples of other wisent  parser based font-lock matches,
> that would be of interest to me too.

> Specifically, my thoughts are to have a parser (or perhaps parsers) to use
> as the MATCHER function in the various font-lock lists such as
> font-lock-syntactic-keywords and font-lock-keywords.  My fear is that  the
> wisent parser is not going to let me hook in like I need to in  order to
> properly create a matcher function.

> As background, I know about ruby-mode and cedet, semantic.  There is
> a wisent attempt at a Ruby parser but it does not do strings
> properly  either.

I don't know what a font-lock rule using wisent would look like.
But since ruby's strings are fairly similar to sh's strings, you may
want to look at what we do there.
The meat is in sh-font-lock-quoted-subshell.


        Stefan

      reply	other threads:[~2008-01-16 21:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-16 18:59 Wisent Parser for font-lock MATCHERS Perry Smith
2008-01-16 21:04 ` Stefan Monnier [this message]

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=jwvsl0xbi1o.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=pedzsan@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.