public inbox for sourcenav@sourceware.org
 help / color / mirror / Atom feed
From: "Jason Andrews" <jrandrews@hotmail.com>
To: "Richard F Weber" <rfweber@link.com>, <sourcenav@sourceware.cygnus.com>
Subject: Re: New Parser/highlighter howto
Date: Mon, 02 Apr 2001 09:25:00 -0000	[thread overview]
Message-ID: <OE65DeWrMY0jaLHQZil000045b3@hotmail.com> (raw)
In-Reply-To: <3AC8779E.8080900@link.com>

Richard,

Good questions, I had the same ones when I created my own 
Verilog parser.

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

The colors are not at all related to the parser.
You have to hook into snavigator/hyper/highlight.c and create
your own flex .l  file to specify what keywords to highlight.
I used ch_high.l as a template.

You also have to find and edit sninit.tcl to turn it on, this was the trick
for me to get it working.

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

Create a file with the list of files you want to parse and feed this
to your parser. My verilog parser is named snvp so I run

% snvp -y files.f -p /bin/more

Now I can see what goes into the database and I can also debug
easier using gdb

  reply	other threads:[~2001-04-02  9:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-02  5:59 Richard F Weber
2001-04-02  9:25 ` Jason Andrews [this message]
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=OE65DeWrMY0jaLHQZil000045b3@hotmail.com \
    --to=jrandrews@hotmail.com \
    --cc=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).