9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re[2]: [9fans] samuel
@ 2002-03-11 15:06 steve.simon
  0 siblings, 0 replies; only message in thread
From: steve.simon @ 2002-03-11 15:06 UTC (permalink / raw)
  To: 9fans


Years ago I wrote a bit of lex that would
build a 2 file ASCII database of the Unix source code.

The primary file contained an object type type, a file ID number, the
line number in the source, and text found.

A seccond file mapped file paths to file ID numbers.

The object types function definitions, variable definitions,
string literals, and comments.

The idea was to be able to grep through the primary file, join the hits to the
seccondry,
and feed the result to B so sam jumps the offending object.

I guess this is pretty much what cscope does but I didn't know of it at the
time - perhaps it wasnt around?

This was very usefull when bugtracking Solaris where we often only had an
obscure error
message which could have come from anywhere in the kernel / applications / X /
etc...

The limitations of parsing with just lex and not understanding C syntax is
obvious
but for a quick and dirty tool it worked well.

I hasen to add this was only usefull as I had many files spread over many
directories which I didn't want to learn my way around.

For day to day editing sam and grep work for me.

-Steve


----------------------------------------------------------------------
The contents of this communication are confidential to the normal user of
the email address to which it was sent.  If you have received this email
in error, any use, dissemination, forwarding, printing or copying of this
email is strictly prohibited.  If this is the case, please notify the
sender and delete this message.
---------------------------------------------------------------------- 



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-03-11 15:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-11 15:06 Re[2]: [9fans] samuel steve.simon

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 NNTP newsgroup(s).