public inbox for sourcenav@sourceware.org
 help / color / mirror / Atom feed
From: Ben Elliston <bje@redhat.com>
To: Jason Andrews <jra@simpod.com>
Cc: "sourcenav@sourceware.cygnus.com" <sourcenav@sourceware.cygnus.com>
Subject: Re: syntax highlighting
Date: Wed, 11 Oct 2000 11:23:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.21.0010120520290.11106-100000@moshpit.cygnus.com> (raw)
In-Reply-To: <39E3C8A4.1EFAA222@simpod.com>

Hi,

   I have integrated a new parser with sorucenav and I am looking for
   documentation on syntax highlighting.

The syntax highlighters have specific hooks into the `hyper'
interpreter.  For an example, go to the `hyper' source directory and grep
for `ch_highlight' in highlight.c.

The idea is that an init function is called once to initialise things and
then an entry point is called periodically whenever S-N's editor wants a
memory buffer (usually the file currently loaded into the editor) to be
scanned for highlighting information.

Such scanners are usually written using Flex.

   Any advice on where to find it or which parser to look at as an
   example is appreciated.

Take a look at hyper/*.l.

Yes, it's not as clean as it ought to be.  Highlighters should be loaded
into the interpreter dynamically.

Cheers, Ben

  reply	other threads:[~2000-10-11 11:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-10-11  6:54 Jason Andrews
2000-10-11 11:23 ` Ben Elliston [this message]
2000-10-13 15:31 Jason Andrews
2000-10-13 17:27 ` Ben Elliston
2000-10-14 18:13   ` Jason Andrews

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=Pine.LNX.4.21.0010120520290.11106-100000@moshpit.cygnus.com \
    --to=bje@redhat.com \
    --cc=jra@simpod.com \
    --cc=sourcenav@sourceware.cygnus.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).