[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Wisent Parser for font-lock MATCHERS

From: Stefan Monnier
Subject: Re: Wisent Parser for font-lock MATCHERS
Date: Wed, 16 Jan 2008 16:04:09 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux)

> 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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]