* Wisent Parser for font-lock MATCHERS
@ 2008-01-16 18:59 Perry Smith
2008-01-16 21:04 ` Stefan Monnier
0 siblings, 1 reply; 2+ messages in thread
From: Perry Smith @ 2008-01-16 18:59 UTC (permalink / raw)
To: emacs-devel
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.
Thank you,
Perry Smith
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Wisent Parser for font-lock MATCHERS
2008-01-16 18:59 Wisent Parser for font-lock MATCHERS Perry Smith
@ 2008-01-16 21:04 ` Stefan Monnier
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2008-01-16 21:04 UTC (permalink / raw)
To: Perry Smith; +Cc: emacs-devel
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-01-16 21:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-16 18:59 Wisent Parser for font-lock MATCHERS Perry Smith
2008-01-16 21:04 ` Stefan Monnier
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.