From: "Richard F Weber" <rfweber@link.com>
To: sourcenav@sourceware.cygnus.com
Subject: New Parser/highlighter howto
Date: Mon, 02 Apr 2001 05:59:00 -0000 [thread overview]
Message-ID: <3AC8779E.8080900@link.com> (raw)
Ok, granted I'm a bit new to Source navigator and hacking on the API,
but here it goes.
I'm working on creating an Ada Parser/Highlighter. I know another
company (CAS I think) is supposed to have an Ada parser, but I've
contacted them on numerous occasions by phone & e-mail and they don't
seem to want to respond. So, as a result, I'm looking to hack out an
Ada parser on my own.
I've found the grammer9x.y & lexer9x.l files from a mirror of the
falls-church Ada site to give a basic start as to how to parse out Ada.
Now I'm just trying to work on actually getting something working.
So my question is:
1) How does the color highlighter exactly work for SN? Does it use the
parser to identify what is a comment, what is a function, etc? Or do I
have to code the syntax checking in separately (ala VIM)
2) Testing parser offline. Is there a way to test the parser offline to
make sure the database is getting what I think it's getting?
I've got the lex code checking and handling comments right now, but the
syntax highlighter doesn't highlight the right code as a comment. So
I'm not sure if I'm doing this stuff right. Any pointers would be very
much appreciated.
I've kind of looked at the chill & python lexer's, but they seem a bit
advanced for me. Of course, if there's a perl module that interfaces
with the SN API calls I could probobally whip something out quicker (but
I'm not sure how to make Perl interface with C <sigh>)
Thanks in advance.
--Rich
next reply other threads:[~2001-04-02 5:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-04-02 5:59 Richard F Weber [this message]
2001-04-02 9:25 ` Jason Andrews
2001-04-02 10:59 Richard F Weber
2001-04-02 12:06 ` Mo DeJong
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=3AC8779E.8080900@link.com \
--to=rfweber@link.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).