Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

What soft do you use to understand code, find xrefs, etc?

3 views
Skip to first unread message

Alexei A. Frounze

unread,
Apr 30, 2006, 1:54:51 AM4/30/06
to
Just wanted to share on the tools a bit...

There're a few things I use at work to understand code. Frankly, I use them
infrequently. For something I'm really deep into, I'm just fine using the
search for/in files function in my file manager (FAR) that works in text
mode (no fancy graphics) and entirely keyboard-driven.
But for the source that isn't mine or mine but I haven't touched it for a
long time, I really need some smart piece of software that is able to list
types, macros, includes, functions, show call graphs / cross references, all
sorts of those things.

I liked Understand for C++ much, but it's trial is 15 days only and it is
rather expensive if used for hobby programming at home (I'm not using the
software from work for my personal stuff).

I've just found Red-hat Source Navigator
(http://sourcenav.sourceforge.net/), which is free and seems to be able to
do these things.

What do you use?

Alex

Aaron Gray

unread,
Apr 30, 2006, 10:58:18 AM4/30/06
to
> What do you use?

Eye balls only.

Aaron


Maxim S. Shatskih

unread,
Apr 30, 2006, 11:35:56 AM4/30/06
to
> I liked Understand for C++ much, but it's trial is 15 days only and it is
> rather expensive if used for hobby programming at home (I'm not using the
> software from work for my personal stuff).

MS Visual Studio's "Find In Files" feature.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
ma...@storagecraft.com
http://www.storagecraft.com

Alexei A. Frounze

unread,
Apr 30, 2006, 1:24:52 PM4/30/06
to
Maxim S. Shatskih wrote:
>> I liked Understand for C++ much, but it's trial is 15 days only and
>> it is rather expensive if used for hobby programming at home (I'm
>> not using the software from work for my personal stuff).
>
> MS Visual Studio's "Find In Files" feature.

You'll be laughing, but even though we're using the MS compiler at work,
Visual Studio isn't installed by default and it can't help to make debugging
easier or more comfortable. It's too hardcore for VS, way too deep into the
kernel to be supported in the first place. But yes, its find in files
feature is good.

Alex

Alexei A. Frounze

unread,
Apr 30, 2006, 1:29:01 PM4/30/06
to
Aaron Gray wrote:
>> What do you use?
>
> Eye balls only.

:)

Alex

Maxim S. Shatskih

unread,
Apr 30, 2006, 4:10:10 PM4/30/06
to
> You'll be laughing, but even though we're using the MS compiler at work,
> Visual Studio isn't installed by default and it can't help to make debugging

I only use VS as text editor. Good editor, BTW.

Aaron Gray

unread,
Apr 30, 2006, 4:29:27 PM4/30/06
to
>> You'll be laughing, but even though we're using the MS compiler at work,
>> Visual Studio isn't installed by default and it can't help to make
>> debugging
>
> I only use VS as text editor. Good editor, BTW.

I do some editting and debugging in Visual Studio, but generally do coding
in The Zeus Editor which has a Brief emulation mode. Find in Files very
occationally.

Aaron


Alexei A. Frounze

unread,
Apr 30, 2006, 5:29:45 PM4/30/06
to
Maxim S. Shatskih wrote:
>> You'll be laughing, but even though we're using the MS compiler at
>> work, Visual Studio isn't installed by default and it can't help to
>> make debugging
>
> I only use VS as text editor. Good editor, BTW.

It is.

Alex

Aaron Gray

unread,
Apr 30, 2006, 5:35:45 PM4/30/06
to
"Alexei A. Frounze" <ale...@chat.ru> wrote in message
news:ZPydnUBOqqj_scjZ...@comcast.com...

Not as good as Brief or Zeus.

No block/column copy and paste :(

Aaron


Alexei A. Frounze

unread,
Apr 30, 2006, 7:53:33 PM4/30/06
to

That's what I love FAR's internal file editor for (not to mention various
plug-ins such as syntax highliting, where you can make your own using the
regular expressions).

Alex

Aaron Gray

unread,
Apr 30, 2006, 9:17:49 PM4/30/06
to
>> No block/column copy and paste :(
>
> That's what I love FAR's internal file editor for (not to mention various
> plug-ins such as syntax highliting, where you can make your own using the
> regular expressions).

Whats FAR ?

Aaron


Aaron Gray

unread,
Apr 30, 2006, 9:21:16 PM4/30/06
to
> Whats FAR ?

http://farmanager.com

Ah...Text mode...thats groce...

Aaron


Alexei A. Frounze

unread,
Apr 30, 2006, 10:34:37 PM4/30/06
to
Aaron Gray wrote:
>> Whats FAR ?
>
> http://farmanager.com
>
> Ah...Text mode...thats groce...

I don't know that word. The first what google could find is this:
Groce Funeral Home And Cremation ServiceLocal family business founded in
1929. Features services, pre-arranged funerals, on-line memorials,
newsletter, and grief support.
www.grocefuneralhome.com/ - 12k - Cached - Similar pages


Groce Funeral HomeGroce Funeral Home was founded in 1929 by the sons of
the Reverend TA Groce, ... Following the deaths of Robert Groce in 1985 and
Willis H. "Bill" Groce in ...
www.grocefuneralhome.com/aboutus.shtml - 8k - Cached - Similar pages


I'm not sure if you meant that kind of "groce". Or did you mean "gross"?

Alex

Francesco Frigo

unread,
May 1, 2006, 5:28:12 AM5/1/06
to
GNU EMACS ...I simply love it!

Maxim S. Shatskih

unread,
May 1, 2006, 10:31:56 AM5/1/06
to
> > That's what I love FAR's internal file editor for (not to mention various
> > plug-ins such as syntax highliting, where you can make your own using the
> > regular expressions).
>
> Whats FAR ?

Norton Commander clone for Win32, with lots of new features and plugins
enabled. Very similar to UNIX's Midnight Commander ("mc").

Aaron Gray

unread,
May 1, 2006, 11:36:27 AM5/1/06
to
>> Ah...Text mode...thats groce...
>
> I don't know that word. The first what google could find is this:

> I'm not sure if you meant that kind of "groce". Or did you mean "gross"?

Yes.

Never did know how to spell properly :)

Aaron


osc...@hotmail.com

unread,
May 1, 2006, 12:32:39 PM5/1/06
to
Notepad. :)

Aaron Gray

unread,
May 1, 2006, 3:44:33 PM5/1/06
to
> Notepad. :)

You obviously do lots of heavy editting tasks.

Aaron


Alexei A. Frounze

unread,
May 1, 2006, 10:17:12 PM5/1/06
to
Aaron Gray wrote:
>> Notepad. :)
>
> You obviously do lots of heavy editting tasks.

Actually, notepad has some real value, despite its limited functionality.
I for one, use a flash card program to automate the memorization process
(things range from foreign words to the driver guide:). While the flash card
program (Pauker) itself is good at its main functionality, it definetely
sucks when it comes to editing the cards or creating a number of cards that
are very similar, but obviously aren't identical.
So, notepad is useful to me because of:
- Unicode support (the flash cards are stored in XML files that are gzipped,
the XML files are in Unicode), not only in editing but also in visualizing
- Search/replace function
And notepad is executed by default from 7-Zip (archiver), which is able to
put the edited file back into the archive after it has been closed. That's
it. A perfect combination of 3 programs, one of which is in the system and
the other two are downloadable off the internet.

Alex

Brian

unread,
May 2, 2006, 12:08:10 AM5/2/06
to

Alexei A. Frounze wrote:
> There're a few things I use at work to understand code.
> But for the source that isn't mine or mine but I haven't touched it for a
> long time, I really need some smart piece of software that is able to list
> types, macros, includes, functions, show call graphs / cross references, all
> sorts of those things.
>
> What do you use?

XEmacs and Doxygen.

Doxygen renders your code and comments as HTML (and also provides a
lookup perl script, I think but I haven't used that). Along with its
minor mode plugin for XEmacs, it does all of the stuff you listed
above. (and probably more- I should see what the newer version does)

Supports C/C++/Java and others.

http://www.stack.nl/~dimitri/doxygen/

Alexei A. Frounze

unread,
May 2, 2006, 12:27:33 AM5/2/06
to

Oh, yes, I know doxygen. I even have it on my disk waiting for the good
time.

Though, it seems to me that there's another tool that I may need --
something for modeling, something capable of modeling state machines and
analyzing the existing code in terms of the states. Not sure if there's
something free yet usable.

Alex

Maxim S. Shatskih

unread,
May 2, 2006, 7:54:12 AM5/2/06
to
> > You obviously do lots of heavy editting tasks.
>
> Actually, notepad has some real value, despite its limited functionality.

Lack of "current line number" indicator is the worst drawback of Notepad.

Maxim S. Shatskih

unread,
May 2, 2006, 7:57:03 AM5/2/06
to
> > http://www.stack.nl/~dimitri/doxygen/
>
> Oh, yes, I know doxygen. I even have it on my disk waiting for the good
> time.

Doxygen is well-known in C#/.NET world.

> Though, it seems to me that there's another tool that I may need --
> something for modeling, something capable of modeling state machines and
> analyzing the existing code in terms of the states. Not sure if there's

C++ is too complex a language for this. Even PREFast for C++ is castrated, and
the guys from PREFast team say that they cannot do better with this language.
PREFast is usually C-only.

But, for C, or for C# (C# world loves such tools) - such a tool is a reality,
if not already exists.

Alexei A. Frounze

unread,
May 2, 2006, 10:02:52 AM5/2/06
to
Maxim S. Shatskih wrote:
>>> You obviously do lots of heavy editting tasks.
>>
>> Actually, notepad has some real value, despite its limited
>> functionality.
>
> Lack of "current line number" indicator is the worst drawback of
> Notepad.

Go to notepad's "View" menu and check "Status Bar" ;)
Don't ask me why by default it's unchecked. I have no idea.

Alex

Maxim S. Shatskih

unread,
May 2, 2006, 11:58:54 AM5/2/06
to
> Go to notepad's "View" menu and check "Status Bar" ;)
> Don't ask me why by default it's unchecked. I have no idea.

My w2k notepad has no View menu :) only File/Edit/Format/Help

Josh Madarasz

unread,
May 2, 2006, 1:49:07 PM5/2/06
to
On Sun, 30 Apr 2006 01:54:51 -0400, Alexei A. Frounze wrote:

> Just wanted to share on the tools a bit...

<Snipped>

>
> What do you use?
>
> Alex

Lets see, PINE is personally my favorite editor or notepad in windows,
though plain old EDIT in dos works well.

Josh

Simon Schroder

unread,
May 2, 2006, 4:10:44 PM5/2/06
to
>> > You obviously do lots of heavy editting tasks.
>>
>> Actually, notepad has some real value, despite its limited functionality.
>
> Lack of "current line number" indicator is the worst drawback of Notepad.
>
You could use Notepad++. I use it as editor for some simple things like
viewing README's (good for viewing open source docs which are UNIX formated)
or writing short code. It has syntax highlighting and also line numbering.
And of course it is free: http://notepad-plus.sourceforge.net/uk/site.htm

Simon


Alexei A. Frounze

unread,
May 2, 2006, 9:16:52 PM5/2/06
to
Maxim S. Shatskih wrote:
>> Go to notepad's "View" menu and check "Status Bar" ;)
>> Don't ask me why by default it's unchecked. I have no idea.
>
> My w2k notepad has no View menu :) only File/Edit/Format/Help

Try windows xp.

Alex

Josh Madarasz

unread,
May 3, 2006, 11:45:01 AM5/3/06
to
Josh Madarasz wrote:

Sorry, that should have been PICO, the editor that comes packaged with
PINE.

Josh

Rod Pemberton

unread,
May 4, 2006, 8:30:03 AM5/4/06
to

"Alexei A. Frounze" <ale...@chat.ru> wrote in message
news:KMidnaqaCNuizMnZ...@comcast.com...

> Just wanted to share on the tools a bit...
>
> There're a few things I use at work to understand code. Frankly, I use
them
> infrequently. For something I'm really deep into, I'm just fine using the
> search for/in files function in my file manager (FAR) that works in text
> mode (no fancy graphics) and entirely keyboard-driven.

> But for the source that isn't mine or mine but I haven't touched it for a
> long time, I really need some smart piece of software that is able to list
> types, macros, includes, functions, show call graphs / cross references,
all
> sorts of those things.
>
> I liked Understand for C++ much, but it's trial is 15 days only and it is
> rather expensive if used for hobby programming at home (I'm not using the
> software from work for my personal stuff).
>
> I've just found Red-hat Source Navigator
> (http://sourcenav.sourceforge.net/), which is free and seems to be able to
> do these things.
>
> What do you use?
>

Nothing, but these may be of use:

CIL - C Intermediate Language - C to C transformation (in OCAML)
http://manju.cs.berkeley.edu/cil/

WCC - A C Subset Compiler (DECUS ftp links now appear to be dead...sorry)
http://www.decus.org/libcatalog/description_html/v00281.html
ftp://ftp.encompassus.org/lib/

npath - C Source Complexity Measures
http://www.geonius.com/software/tools/npath.html

Check: A unit test framework for C
http://check.sourceforge.net/

CTool Library (call-graph generator, source transformations)
http://ctool.sourceforge.net/

Cproto automatically generates C function prototypes
http://cproto.sourceforge.net/
http://www.ibiblio.org/pub/Linux/devel/lang/c/!INDEX.short.html

JSCPP - a C preprocessor + parser with special modes
http://www.die-schoens.de/prg/

CXREF C language cross referencing program
in volume1 of comp.sources.unix:
http://ftp.sunet.se/pub/usenet/ftp.uu.net/comp.sources.unix/
http://www.ibiblio.org/pub/Linux/devel/lang/c/!INDEX.short.html

CSur Le projet Csur (in French)
An analyzer of code C to detect common program execution errors
http://www.lsv.ens-cachan.fr/~goubault/Csur/csur.html

Chico State Mini-C Compiler (CSMCC) is a student training load-and-go
compiler (incomplete, teaching tool)
http://www.ecst.csuchico.edu/~sameerg/compproj.html
http://www.ecst.csuchico.edu/~hilzer/csci250/proj/

Edward Willink's C++ grammars:
http://www.computing.surrey.ac.uk/research/dsrg/fog/
(some of the links have an extra text '/v' in them, just delete)

ISO C/C++ grammars version 1.2 (c-c++-grammars-1.2.tar.gz)
http://www.sigala.it/sandro/download.php

A C99 Parser, a recursive decent parser
http://www.mazumdar.demon.co.uk/c_parser.html

Ctags generates an index (or tag) file of language objects
http://ctags.sourceforge.net/
http://www.ibiblio.org/pub/Linux/devel/lang/c/!INDEX.short.html

Cdecl English<->C translator for C declarations
cdecl in volume6 of comp.sources.unix:
cdecl2 in volume14 of comp.sources.unix:
http://ftp.sunet.se/pub/usenet/ftp.uu.net/comp.sources.unix/
http://www.ibiblio.org/pub/Linux/devel/lang/c/!INDEX.short.html

Unproto remove C prototypes
http://www.sunsite.org.uk/package/wietse/unix

GNU Cflow graph of C source flow
http://www.gnu.org/software/cflow/
http://www.ibiblio.org/pub/Linux/devel/lang/c/!INDEX.short.html

Calls generates call graph of source
http://hpux.ee.ualberta.ca/hppd/hpux/Misc/calls-3.3/
http://www.ibiblio.org/pub/Linux/devel/lang/c/!INDEX.short.html

Cscope interactive symbol cross-reference and search
http://cscope.sourceforge.net/

Unifdef processes conditional preprocessor macros
http://www.freebsd.org/cgi/cvsweb.cgi/src/usr.bin/unifdef/

SCPP Selective C preprocessor
http://www.ibiblio.org/pub/Linux/devel/lang/c/!INDEX.short.html

Proto locate include file for missing prototype
http://www.ibiblio.org/pub/Linux/devel/lang/c/!INDEX.short.html

ANTLR Grammar list
C++ grammar
http://www.antlr.org/grammar/list

Elkhound/Else C/C++ GLR parsers
http://www.cs.berkeley.edu/~smcpeak/elkhound/

ROSE
http://www.llnl.gov/CASC/rose/

C Front End (commercial C90/C99/GCC3/MSVS6)
http://www.semdesigns.com/Products/FrontEnds/CFrontEnd.html

CCURED memory safe C transformations (for CIL)
http://manju.cs.berkeley.edu/ccured/

C Code Checker (for CIL)
http://www.drugphish.ch/~jonny/cca.html

PScan Scan C files for format string overflows
http://www.striker.ottawa.on.ca/~aland/pscan/

CQUAL C checking through extended type qualifiers
http://www.cs.umd.edu/~jfoster/cqual/

Smatch - Source Matcher, C source checker for Linux Kernel
http://smatch.sourceforge.net/

SPLint Secure Programming Lint error detection
http://www.splint.org

LCLint Larch C Lint error detection
http://www.ibiblio.org/pub/Linux/devel/lang/c/!INDEX.short.html

BOON Buffer Overrun detectiON
http://www.cs.berkeley.edu/~daw/boon/

CZECH, project pedantic error detection
http://pedantic.sourceforge.net/

Flawfinder for C (in Python)
http://www.dwheeler.com/flawfinder/

ASTREE determines absence of runtime errors (in OCAML)
http://www.astree.ens.fr/


HTH,

Rod Pemberton

Alexei A. Frounze

unread,
Jul 15, 2006, 2:15:09 PM7/15/06
to
Rod Pemberton wrote:
> "Alexei A. Frounze" <ale...@chat.ru> wrote in message
> news:KMidnaqaCNuizMnZ...@comcast.com...
>> Just wanted to share on the tools a bit...
>>
>> There're a few things I use at work to understand code. Frankly, I
>> use them infrequently. For something I'm really deep into, I'm just
>> fine using the search for/in files function in my file manager (FAR)
>> that works in text mode (no fancy graphics) and entirely
>> keyboard-driven.
>> But for the source that isn't mine or mine but I haven't touched it
>> for a long time, I really need some smart piece of software that is
>> able to list types, macros, includes, functions, show call graphs /
>> cross references, all sorts of those things.
>>
>> I liked Understand for C++ much, but it's trial is 15 days only and
>> it is rather expensive if used for hobby programming at home (I'm
>> not using the software from work for my personal stuff).
>>
>> I've just found Red-hat Source Navigator
>> (http://sourcenav.sourceforge.net/), which is free and seems to be
>> able to do these things.
>>
>> What do you use?
>>
>
> Nothing, but these may be of use:
...

> npath - C Source Complexity Measures
> http://www.geonius.com/software/tools/npath.html

As usual, I can't build anything unixish in non-unix environment. I wanted
this tool to find the cyclomatic complexity.

Alex

Rod Pemberton

unread,
Jul 15, 2006, 7:08:50 PM7/15/06
to

"Alexei A. Frounze" <ale...@chat.ru> wrote in message
news:gKednXrKJ9MjrSTZ...@comcast.com...

It appears that I never built it. The grammars .y .l should build with
bison/flex as is or with minor modification. I'm not sure about the rex
stuff. I've had problems getting older C code to work, so there may be some
updating/porting issues there.


Rod Pemberton

PS. Any opinions on the WTO negotiations between Russia and the US?


Alexei A. Frounze

unread,
Jul 15, 2006, 8:31:03 PM7/15/06
to
Rod Pemberton wrote:
> "Alexei A. Frounze" <ale...@chat.ru> wrote in message
> news:gKednXrKJ9MjrSTZ...@comcast.com...

>> Rod Pemberton wrote:
...
>>> npath - C Source Complexity Measures
>>> http://www.geonius.com/software/tools/npath.html
>>
>> As usual, I can't build anything unixish in non-unix environment. I
>> wanted this tool to find the cyclomatic complexity.
>>
>
> It appears that I never built it. The grammars .y .l should build
> with bison/flex as is or with minor modification. I'm not sure about
> the rex stuff. I've had problems getting older C code to work, so
> there may be some updating/porting issues there.

There's a whole bunch of warnings if I compile it as is, which freaks me out
in the first place (I overlooked the fact that I don't need to build .y
files as they're already built). Then if I try building .y files I get way
more problems starting with shift/reduce conflict message (which I don't
know how to treat as an error or warning), some of missing symbols, some
duplicates. I don't know if the unix world and culture has always been a
mess, but it certainly appeared to me so.

> PS. Any opinions on the WTO negotiations between Russia and the US?

I'm not sure we need it to be there.

Alex

Ciaran Keating

unread,
Jul 15, 2006, 10:00:13 PM7/15/06
to
On Sun, 16 Jul 2006 10:31:03 +1000, Alexei A. Frounze <ale...@chat.ru>
wrote:

> Then if I try building .y files I get way more problems starting with
> shift/reduce conflict message (which I don't know how to treat as an
> error or warning)

For what it's worth, I think shift/reduce conflicts are usually
warnings... I think yacc makes a choice based on the order of the rules in
the grammar. If necessary, increasing the lookahead may help resolve these
conflicts, but at the cost of lesser efficiency.

In my very limited experience and understanding of grammars and parsers, I
believe that this kind of conflict is pretty much accepted for common
useful grammars, parsed by parsers with reasonable performance.


Cheers,
Ciaran

Maxim S. Shatskih

unread,
Jul 16, 2006, 3:08:40 AM7/16/06
to
> PS. Any opinions on the WTO negotiations between Russia and the US?

Many people in Russia consider entering WTO to be not a good idea :-)

Maxim S. Shatskih

unread,
Jul 16, 2006, 3:13:22 AM7/16/06
to
> PS. Any opinions on the WTO negotiations between Russia and the US?

Wow! According to www.lenta.ru Russian news site, US demanded Russia to allow
US beef to be importable to Russia _without veterinary control_.

"Hey guys, please eat this junk, we cannot eat it ourselves since we value our
health too much!".

Nothing strange that Russia disagreed.

Alexei A. Frounze

unread,
Jul 16, 2006, 4:06:27 AM7/16/06
to
Maxim S. Shatskih wrote:
>> PS. Any opinions on the WTO negotiations between Russia and the US?
>
> Wow! According to www.lenta.ru Russian news site, US demanded Russia
> to allow US beef to be importable to Russia _without veterinary
> control_.
>
> "Hey guys, please eat this junk, we cannot eat it ourselves since we
> value our health too much!".
>
> Nothing strange that Russia disagreed.

And I wonder how much it's gonna cost if it ever makes it to Russia... :)

Alex

Rod Pemberton

unread,
Jul 16, 2006, 6:37:49 AM7/16/06
to

"Alexei A. Frounze" <ale...@chat.ru> wrote in message
news:-YidnWF9hocVbiTZ...@comcast.com...

Maxim and Alexei,

I'm interested in what the US media says versus the Russian media about the
WTO negotiations. So far, the US media says talks are stalled due to:

1) branches of US insurance agents (allowed)
2) branches of US banks (denied)
3) protection of US copyrights and patents (?)
4) Russia accepts more US farm goods (?)
5) Russia's tariffs on US Airplanes (?)

Since the US media didn't mention the beef issue (Is that considered farm
goods?), what else does the Russian media say it's stalled for?

I'm of the opinion that entry into the WTO will be good long-term for
Russia, but I'm unsure of the short-term benefits... But, after 13 years of
trying, it's time to do it or don't.

I'm a bit surprised though, that after the two of you discussing the sad
state of affairs in Russian electronics, that you don't think the WTO entry
will help Russia's economy. What don't I understand?


Rod Pemberton

Rod Pemberton

unread,
Jul 16, 2006, 9:46:05 AM7/16/06
to

"Alexei A. Frounze" <ale...@chat.ru> wrote in message
news:QqadnY_3pZVxFSTZ...@comcast.com...

At the bottom, are the patches to npath to compile w/DJGPP. The .y & .l
grammars will need to be updated...

extract npath.tar.Z
patch -p0 < npath.pch
cd npath
ren Makefile.x86os5 Makefile
make

Rod Pemberton

----npath.pch----
diff -Naur npath/Makefile.x86os5 npath_new/Makefile.x86os5
--- npath/Makefile.x86os5 1997-12-29 18:13:46.000000000 +0000
+++ npath_new/Makefile.x86os5 2006-07-16 08:49:44.000000000 +0000
@@ -26,7 +26,7 @@

OBJS = $(SRCS:.c=.o)

-LIBS = -ll -lm
+LIBS = -lfl -lm

INSTALL_DIR = $(HOME)/local/bin

@@ -35,11 +35,11 @@
# FLEX_SCANNER to the "-D" list in CPPFLAGS.

#***************************************************************************
****

-#CC = gcc
-#CFLAGS = -g -Wall
-#LINK.c = gcc
-CC = cc
-CFLAGS = -g -Xs
+CC = gcc
+CFLAGS = -g -Wall
+LINK.c = gcc
+#CC = cc
+#CFLAGS = -g -Xs

CPPFLAGS = -DYYDEBUG=1 -I.

@@ -57,13 +57,13 @@
# look ahead in the input stream.

#***************************************************************************
****

-#LEX.l = flex
-#LEXFLAGS.l = "-I"
-LEX.l = lex -tv
-
-#YACC = bison
-YACC = yacc
-YACCFLAGS = -dv
+LEX.l = flex -t
+LEXFLAGS.l = "-I"
+#LEX.l = lex -tv
+
+YACC = bison
+#YACC = yacc
+YACCFLAGS = -y -dv

.KEEP_STATE:

@@ -72,21 +72,21 @@
$(PROGRAM): $(OBJS)
$(LINK.c) $(LDFLAGS) $(OBJS) $(LIBS) -o $@

-npath_lex.c: y.tab.h
+npath_lex.c: y_tab.h

-npath_yacc.c + y.tab.h: npath_yacc.y
- $(YACC) $(YACCFLAGS) npath_yacc.y
- mv y.tab.c npath_yacc.c
+npath_yacc.c + y_tab.h: npath_yacc.y
+ $(YACC) $(YACCFLAGS) -o y_tab.c npath_yacc.y
+ mv y_tab.c npath_yacc.c

rex_util_y.c: rex_util_y.y
- $(YACC) $(YACCFLAGS) rex_util_y.y
+ $(YACC) $(YACCFLAGS) -o y_tab.c rex_util_y.y
$(RM) $@
- sed -e 's/extern char \*malloc(), \*realloc();//' -e 's/yy/rr/g' -e
's/YY/RR/g' y.tab.c > $@
- $(RM) y.tab.c y.tab.h
+ sed -e 's/extern char \*malloc(), \*realloc();//' -e 's/yy/rr/g' -e
's/YY/RR/g' y_tab.c > $@
+ $(RM) y_tab.c y_tab.h

clean::
-$(RM) $(OBJS) $(PROGRAM)
- -$(RM) npath_lex.c npath_yacc.c rex_util_y.c y.output y.tab.h
+ -$(RM) npath_lex.c npath_yacc.c rex_util_y.c y.output y_tab.h

install:
cp $(PROGRAM) npath.exclude $(INSTALL_DIR)
diff -Naur npath/npath_lex.l npath_new/npath_lex.l
--- npath/npath_lex.l 1997-12-29 17:49:58.000000000 +0000
+++ npath_new/npath_lex.l 2006-07-16 09:19:14.000000000 +0000
@@ -51,7 +51,7 @@
#ifdef vms
# include "y_tab.h" /* YACC token definitions. */
#else
-# include "y.tab.h" /* YACC token definitions. */
+# include "y_tab.h" /* YACC token definitions. */
#endif

#ifdef yyin
@@ -191,11 +191,8 @@
{L}({L}|{D})* { CHECK_OPERAND (yytext) ; return (check_type()); }

0[xX]{H}+{IS}? { CHECK_OPERAND (yytext) ; return (CONSTANT); }
-0[xX]{H}+{IS}? { CHECK_OPERAND (yytext) ; return (CONSTANT); }
-0{D}+{IS}? { CHECK_OPERAND (yytext) ; return (CONSTANT); }
0{D}+{IS}? { CHECK_OPERAND (yytext) ; return (CONSTANT); }
{D}+{IS}? { CHECK_OPERAND (yytext) ; return (CONSTANT); }
-{D}+{IS}? { CHECK_OPERAND (yytext) ; return (CONSTANT); }
'(\\.|[^\\'])+' { CHECK_OPERAND (yytext) ; return (CONSTANT); }

{D}+{E}{FS}? { CHECK_OPERAND (yytext) ; return (CONSTANT); }
diff -Naur npath/npath_yacc.y npath_new/npath_yacc.y
--- npath/npath_yacc.y 1997-12-29 17:48:26.000000000 +0000
+++ npath_new/npath_yacc.y 2006-07-16 09:16:48.000000000 +0000
@@ -88,7 +88,10 @@
%token STRUCT UNION _ENUM ELIPSIS RANGE
%token VARIANT_STRUCT VARIANT_UNION /* VAX-C */

-%token CASE DEFAULT IF ELSE SWITCH WHILE DO FOR GOTO CONTINUE BREAK RETURN
+%token CASE DEFAULT IF
+%nonassoc NOELSE
+%nonassoc ELSE
+%token SWITCH WHILE DO FOR GOTO CONTINUE BREAK RETURN

%start file
%%
@@ -804,7 +807,7 @@
;

selection_statement
- : IF '(' expr ')' statement
+ : IF '(' expr ')' statement %prec NOELSE
{ $$.npath = $3.npath + $5.npath + 1 ;
if (m != NULL) m->v_of_g++ ;
NPATH_DEBUG ($$.npath, "if (expr) statement") ;
@@ -966,7 +969,7 @@
%%


-yyerror (
+int yyerror (

# if defined(__STDC__) || defined(vaxc)
const char *s)
@@ -981,4 +984,5 @@
printf ("%s in %s, column %d of line %d:\n%s\n%*s\n",
s, cpp_file_name, lex_next_char, cpp_line_number,
lex_input_buffer, lex_next_char, "^") ;
+ return 0;
}
diff -Naur npath/vperror.h npath_new/vperror.h
--- npath/vperror.h 1997-01-02 17:32:38.000000000 +0000
+++ npath_new/vperror.h 2006-07-16 08:00:14.000000000 +0000
@@ -28,7 +28,7 @@
default destination of error output is STDERR.

****************************************************************************
***/

-extern vperror_print ; /* 0 = no print, !0 = print */
+extern int vperror_print ; /* 0 = no print, !0 = print */
extern FILE *vperror_file ; /* VPERROR output device */


Maxim S. Shatskih

unread,
Jul 16, 2006, 12:14:59 PM7/16/06
to
> 1) branches of US insurance agents (allowed)

Really? I have heard that Russia disallowed foreign insurance companies, even
on WTO negotiations. We have lots of domestic one here, which work OK (for car
insurance for instance), so why allow the capital to flow out?

> 2) branches of US banks (denied)

The same cause as above.

> 3) protection of US copyrights and patents (?)

Yes, this may be the issue. I'm for copyright supporting.

> 4) Russia accepts more US farm goods (?)

Again - domestic is better.

> 5) Russia's tariffs on US Airplanes (?)

And again domestic are better. Russia can produce airplanes at home (though not
the modern passenger/freight aircraft engines for now).

So, this is a usual protection of the domestic market.

> I'm of the opinion that entry into the WTO will be good long-term for
> Russia, but I'm unsure of the short-term benefits... But, after 13 years of
> trying, it's time to do it or don't.

Correct, I think that maybe the Russian governement will enter WTO, even
surrendering some of the domestic market protection positions. Looks like so.

Anyway WTO seems to be good for the rich countries and not-so-good for
not-so-rich ones.

> I'm a bit surprised though, that after the two of you discussing the sad
> state of affairs in Russian electronics, that you don't think the WTO entry
> will help Russia's economy.

How WTO will help Russian electronics? by pumping the capitals to the richer
countries via foreign banks and insurance? by purchasing the very aged foreign
airplanes (look! 2 old Airbus crashed in ex-USSR countries in the last couple
of months, possibly due to age)?

Protectionism is a good thing, and the lack of US banks in Russia is NOT a
stopper for foreign investments in electronics (there are stoppers, but not WTO
membership).

Once more - WTO is good for the richest and bad for not-so-rich.

Alexei A. Frounze

unread,
Jul 16, 2006, 2:22:36 PM7/16/06
to
Maxim S. Shatskih wrote:
...

> Protectionism is a good thing, and the lack of US banks in Russia is
> NOT a stopper for foreign investments in electronics (there are
> stoppers, but not WTO membership).
>
> Once more - WTO is good for the richest and bad for not-so-rich.

I second that. Playing by some others' rules now would only worsen the
situation in Russia. Whoever's trying to pull Russia in WTO don't think of
that really well. Most likely they have different interests. As usual.

Alex

Alexei A. Frounze

unread,
Jul 16, 2006, 2:28:51 PM7/16/06
to
Rod Pemberton wrote:
> "Alexei A. Frounze" <ale...@chat.ru> wrote in message
...

>> There's a whole bunch of warnings if I compile it as is, which
>> freaks me out in the first place (I overlooked the fact that I don't
>> need to build .y files as they're already built). Then if I try
>> building .y files I get way more problems starting with shift/reduce
>> conflict message (which I don't know how to treat as an error or
>> warning), some of missing symbols, some duplicates. I don't know if
>> the unix world and culture has always been a mess, but it certainly
>> appeared to me so.
>>
>
> At the bottom, are the patches to npath to compile w/DJGPP. The .y &
> .l grammars will need to be updated...

Thanks. Actually I have already fixed the C sources, including the missing
brackets. I understand that various tools don't always generate something
compilable as-is, but it's better to have minor warnings like defined but
unused/unreferenced than something that makes you think.

Alex

Rod Pemberton

unread,
Jul 17, 2006, 2:30:13 AM7/17/06
to

"Alexei A. Frounze" <ale...@chat.ru> wrote in message
news:M4mdnSRKh_rjGCfZ...@comcast.com...

I frequently find that I come back around to using tools or code I've worked
on in the past. So, I'd appreciate it if you'd post any minor patches/fixes
that I didn't post. If it's something large (i.e., new grammar...), don't
post that.


You're Welcome and Thanks!


Rod Pemberton


Alexei A. Frounze

unread,
Jul 17, 2006, 3:07:40 AM7/17/06
to

Diff of mine with the original (built with: gcc
*.c -Wall -DYYDEBUG=1 -DCLEAN -o npath.exe):
-------8<-------
Only in npath2: mk.bat
Only in npath2: npath.exe
Only in npath2: npath.gdt
Only in npath2: npath.gpr
diff -w npath/npath.h npath2/npath.h
107c107
< extern int yyerror P_((const char *s)) ;
---
> extern void yyerror P_((const char *s)) ;
Only in npath2: npath.html
diff -w npath/npath_lex.c npath2/npath_lex.c
217,218c217,218
< yylex(){
< int nstr; extern int yyprevious;
---
> int yylex(){
> int nstr;
1920a1921
> #if !defined(CLEAN)
2092a2094,2267
> #else
> {0,0}, { 0,0}, { 1,3}, { 0,0},
> {0,0}, { 0,0}, { 0,0}, { 0,0},
> {0,0}, { 0,0}, { 1,4}, { 1,5},
> {0,0}, { 0,0}, { 0,0}, { 0,0},
> {0,0}, { 0,0}, { 0,0}, { 0,0},
> {0,0}, { 0,0}, { 0,0}, { 0,0},
> {0,0}, { 0,0}, { 0,0}, { 0,0},
> {0,0}, { 0,0}, { 0,0}, { 0,0},
> {0,0}, { 0,0}, { 1,6}, { 1,7},
> {1,8}, { 1,9}, { 1,10}, { 1,11},
> {1,12}, { 1,13}, { 1,14}, { 1,15},
> {1,16}, { 1,17}, { 1,18}, { 1,19},
> {1,20}, { 1,21}, { 1,22}, { 1,22},
> {1,22}, { 1,22}, { 1,22}, { 1,22},
> {1,22}, { 1,22}, { 1,22}, { 1,23},
> {1,24}, { 1,25}, { 1,26}, { 1,27},
> {1,28}, { 6,53}, { 1,9}, { 10,58},
> {4,5}, { 4,5}, { 1,9}, { 4,5},
> {15,63}, { 19,69}, { 11,59}, { 19,70},
> {19,70}, { 19,70}, { 19,70}, { 19,70},
> {19,70}, { 19,70}, { 19,70}, { 19,70},
> {19,70}, { 20,71}, { 26,80}, { 16,64},
> {31,83}, { 1,9}, { 61,115}, {4,5},
> {1,29}, { 1,3}, { 1,30}, { 1,31},
> {1,32}, { 11,60}, { 1,33}, { 1,34},
> {1,35}, { 1,36}, { 1,37}, { 1,38},
> {1,39}, { 16,65}, { 1,40}, { 25,78},
> {25,79}, { 1,41}, { 32,84}, { 1,42},
> {27,81}, { 27,82}, { 41,101}, {1,43},
> {1,44}, { 1,45}, { 1,46}, { 1,47},
> {1,48}, { 33,85}, { 34,86}, { 42,102},
> {1,49}, { 1,50}, { 1,51}, { 1,52},
> {2,6}, { 43,103}, {2,8}, { 38,95},
> {2,10}, { 2,11}, { 38,96}, { 2,13},
> {2,14}, { 2,15}, { 45,108}, {2,17},
> {2,18}, { 2,19}, { 2,20}, { 18,66},
> {2,22}, { 2,22}, { 2,22}, { 2,22},
> {2,22}, { 2,22}, { 2,22}, { 2,22},
> {2,22}, { 2,23}, { 2,24}, { 2,25},
> {2,26}, { 2,27}, { 2,28}, { 18,67},
> {18,68}, { 35,87}, { 36,90}, { 40,99},
> {37,92}, { 46,109}, {37,93}, { 39,97},
> {35,88}, { 47,110}, {39,98}, { 40,100},
> {36,91}, { 48,112}, {69,116}, {35,89},
> {37,94}, { 50,113}, {56,0}, { 78,126},
> {82,127}, {84,128}, {85,129}, {47,111},
> {86,130}, {87,131}, {2,29}, { 88,132},
> {2,30}, { 2,31}, { 2,32}, { 89,133},
> {2,33}, { 2,34}, { 2,35}, { 2,36},
> {2,37}, { 2,38}, { 2,39}, { 7,54},
> {2,40}, { 90,134}, {56,54}, { 2,41},
> {91,135}, {2,42}, { 62,0}, { 7,54},
> {7,54}, { 2,43}, { 2,44}, { 2,45},
> {2,46}, { 2,47}, { 2,48}, { 44,104},
> {44,105}, {92,136}, {2,49}, { 2,50},
> {2,51}, { 2,52}, { 93,137}, {94,138},
> {95,139}, {96,140}, {97,141}, {44,106},
> {98,142}, {75,75}, { 44,107}, {100,143},
> {7,55}, { 101,144}, { 7,54}, { 62,61},
> {102,145}, { 7,54}, { 75,75}, { 103,146},
> {50,114}, {7,54}, { 74,123}, {104,149},
> {74,123}, {103,147}, { 7,54}, { 74,124},
> {74,124}, {74,124}, {74,124}, {74,124},
> {74,124}, {74,124}, {74,124}, {74,124},
> {74,124}, {107,154}, { 103,148}, { 108,155},
> {56,54}, { 75,75}, { 9,57}, { 7,54},
> {110,158}, { 105,150}, { 111,159}, { 7,54},
> {106,152}, { 111,160}, { 75,75}, { 112,161},
> {128,170}, { 129,171}, { 9,57}, { 9,57},
> {9,57}, { 9,57}, { 9,57}, { 9,57},
> {9,57}, { 9,57}, { 9,57}, { 9,57},
> {105,151}, { 106,153}, { 7,54}, { 130,172},
> {62,61}, { 131,173}, { 7,56}, { 9,57},
> {9,57}, { 9,57}, { 9,57}, { 9,57},
> {9,57}, { 9,57}, { 9,57}, { 9,57},
> {9,57}, { 9,57}, { 9,57}, { 9,57},
> {9,57}, { 9,57}, { 9,57}, { 9,57},
> {9,57}, { 9,57}, { 9,57}, { 9,57},
> {9,57}, { 9,57}, { 9,57}, { 9,57},
> {9,57}, { 132,174}, { 133,175}, { 133,176},
> {134,177}, { 9,57}, { 135,178}, { 9,57},
> {9,57}, { 9,57}, { 9,57}, { 9,57},
> {9,57}, { 9,57}, { 9,57}, { 9,57},
> {9,57}, { 9,57}, { 9,57}, { 9,57},
> {9,57}, { 9,57}, { 9,57}, { 9,57},
> {9,57}, { 9,57}, { 9,57}, { 9,57},
> {9,57}, { 9,57}, { 9,57}, { 9,57},
> {9,57}, { 12,61}, { 136,179}, { 109,156},
> {137,180}, { 138,181}, { 139,182}, { 141,183},
> {142,184}, { 12,61}, { 12,61}, { 144,185},
> {21,72}, { 109,157}, { 21,73}, { 21,73},
> {21,73}, { 21,73}, { 21,73}, { 21,73},
> {21,73}, { 21,73}, { 21,73}, { 21,73},
> {70,70}, { 70,70}, { 70,70}, { 70,70},
> {70,70}, { 70,70}, { 70,70}, { 70,70},
> {70,70}, { 70,70}, { 12,61}, { 21,74},
> {12,61}, { 145,186}, { 146,187}, { 12,0},
> {119,164}, { 119,165}, { 21,75}, { 12,61},
> {122,122}, { 70,117}, {70,118}, {119,165},
> {12,61}, { 147,188}, { 148,189}, { 21,75},
> {70,118}, {122,122}, { 21,76}, { 123,124},
> {123,124}, { 123,124}, { 123,124}, { 123,124},
> {123,124}, { 123,124}, { 123,124}, { 123,124},
> {123,124}, { 12,61}, { 149,190}, { 21,74},
> {150,191}, { 12,61}, { 151,192}, { 152,193},
> {119,164}, { 119,165}, { 21,75}, { 153,194},
> {122,122}, { 70,117}, {70,118}, {119,165},
> {154,195}, { 124,168}, { 155,196}, { 21,75},
> {70,118}, {122,122}, { 21,76}, { 124,168},
> {12,61}, { 156,197}, { 157,198}, { 22,72},
> {12,62}, { 22,77}, { 22,77}, { 22,77},
> {22,77}, { 22,77}, { 22,77}, { 22,77},
> {22,77}, { 22,77}, { 22,77}, { 72,119},
> {72,119}, {72,119}, {72,119}, {72,119},
> {72,119}, {72,119}, {72,119}, {72,119},
> {72,119}, {124,168}, { 22,74}, { 158,199},
> {159,200}, { 125,169}, { 160,201}, { 124,168},
> {161,202}, { 22,75}, { 170,205}, { 163,118},
> {72,120}, {72,121}, {125,169}, { 172,206},
> {175,207}, { 163,118}, { 22,75}, { 72,121},
> {73,73}, { 73,73}, { 73,73}, { 73,73},
> {73,73}, { 73,73}, { 73,73}, { 73,73},
> {73,73}, { 73,73}, { 176,208}, { 177,209},
> {178,210}, { 181,211}, { 22,74}, { 182,212},
> {183,213}, { 125,169}, { 186,214}, { 187,215},
> {188,216}, { 22,75}, { 189,217}, { 163,118},
> {72,120}, {72,121}, {125,169}, { 190,218},
> {73,122}, {163,118}, { 22,75}, { 72,121},
> {191,219}, { 192,220}, { 193,221}, { 194,222},
> {195,223}, { 73,122}, {196,224}, { 197,225},
> {198,226}, { 199,227}, { 201,228}, { 202,229},
> {76,125}, {76,125}, {76,125}, {76,125},
> {76,125}, {76,125}, {76,125}, {76,125},
> {76,125}, {76,125}, {205,230}, { 208,231},
> {209,232}, { 210,233}, { 211,234}, { 213,235},
> {73,122}, {76,125}, {76,125}, {76,125},
> {76,125}, {76,125}, {76,125}, {214,236},
> {117,162}, { 73,122}, {117,162}, { 215,237},
> {216,238}, { 117,163}, { 117,163}, { 117,163},
> {117,163}, { 117,163}, { 117,163}, { 117,163},
> {117,163}, { 117,163}, { 117,163}, { 162,163},
> {162,163}, { 162,163}, { 162,163}, { 162,163},
> {162,163}, { 162,163}, { 162,163}, { 162,163},
> {162,163}, { 76,125}, {76,125}, {76,125},
> {76,125}, {76,125}, {76,125}, {120,166},
> {217,239}, { 120,166}, { 219,240}, { 220,241},
> {120,167}, { 120,167}, { 120,167}, { 120,167},
> {120,167}, { 120,167}, { 120,167}, { 120,167},
> {120,167}, { 120,167}, { 164,203}, { 221,242},
> {164,203}, { 222,243}, { 223,244}, { 164,204},
> {164,204}, { 164,204}, { 164,204}, { 164,204},
> {164,204}, { 164,204}, { 164,204}, { 164,204},
> {164,204}, { 166,167}, { 166,167}, { 166,167},
> {166,167}, { 166,167}, { 166,167}, { 166,167},
> {166,167}, { 166,167}, { 166,167}, { 167,121},
> {169,169}, { 204,165}, { 224,245}, { 226,246},
> {227,247}, { 167,121}, { 228,248}, { 204,165},
> {231,249}, { 169,169}, { 203,204}, { 203,204},
> {203,204}, { 203,204}, { 203,204}, { 203,204},
> {203,204}, { 203,204}, { 203,204}, { 203,204},
> {232,250}, { 236,254}, { 235,251}, { 237,255},
> {238,256}, { 245,257}, { 246,258}, { 247,259},
> {248,260}, { 249,261}, { 251,262}, { 167,121},
> {169,169}, { 204,165}, { 252,263}, { 253,264},
> {235,252}, { 167,121}, { 255,265}, { 204,165},
> {235,253}, { 169,169}, { 256,266}, { 258,267},
> {259,268}, { 260,269}, { 262,270}, { 263,271},
> {264,272}, { 268,273}, { 272,275}, { 268,274},
> {273,276}, { 274,277}, { 275,278}, { 276,279},
> {277,280}, { 279,281}, { 280,282}, { 281,283},
> {282,284}, { 283,285}, { 0,0}, { 0,0},
> {0,0}};
> #endif
2093a2269
> #if !defined(CLEAN)
2380a2557,2845
> #else
> {0, 0, 0},
> {yycrank+-1, 0, 0},
> {yycrank+-95, yysvec+1, 0},
> {yycrank+0, 0, yyvstop+1},
> {yycrank+59, 0, yyvstop+3},
> {yycrank+0, yysvec+4, yyvstop+6},
> {yycrank+4, 0, yyvstop+8},
> {yycrank+-198, 0, yyvstop+11},
> {yycrank+0, 0, yyvstop+13},
> {yycrank+226, 0, yyvstop+16},
> {yycrank+6, 0, yyvstop+19},
> {yycrank+36, 0, yyvstop+22},
> {yycrank+-348, 0, yyvstop+25},
> {yycrank+0, 0, yyvstop+27},
> {yycrank+0, 0, yyvstop+30},
> {yycrank+11, 0, yyvstop+33},
> {yycrank+44, 0, yyvstop+36},
> {yycrank+0, 0, yyvstop+39},
> {yycrank+98, 0, yyvstop+42},
> {yycrank+27, 0, yyvstop+45},
> {yycrank+24, 0, yyvstop+48},
> {yycrank+314, 0, yyvstop+51},
> {yycrank+393, 0, yyvstop+55},
> {yycrank+0, 0, yyvstop+59},
> {yycrank+0, 0, yyvstop+62},
> {yycrank+47, 0, yyvstop+65},
> {yycrank+25, 0, yyvstop+68},
> {yycrank+51, 0, yyvstop+71},
> {yycrank+0, 0, yyvstop+74},
> {yycrank+0, 0, yyvstop+77},
> {yycrank+0, 0, yyvstop+80},
> {yycrank+27, 0, yyvstop+83},
> {yycrank+13, yysvec+9, yyvstop+86},
> {yycrank+4, yysvec+9, yyvstop+89},
> {yycrank+8, yysvec+9, yyvstop+92},
> {yycrank+64, yysvec+9, yyvstop+95},
> {yycrank+61, yysvec+9, yyvstop+98},
> {yycrank+56, yysvec+9, yyvstop+101},
> {yycrank+23, yysvec+9, yyvstop+104},
> {yycrank+59, yysvec+9, yyvstop+107},
> {yycrank+61, yysvec+9, yyvstop+110},
> {yycrank+3, yysvec+9, yyvstop+113},
> {yycrank+12, yysvec+9, yyvstop+116},
> {yycrank+28, yysvec+9, yyvstop+119},
> {yycrank+111, yysvec+9, yyvstop+122},
> {yycrank+17, yysvec+9, yyvstop+125},
> {yycrank+55, yysvec+9, yyvstop+128},
> {yycrank+72, yysvec+9, yyvstop+131},
> {yycrank+69, yysvec+9, yyvstop+134},
> {yycrank+0, 0, yyvstop+137},
> {yycrank+116, 0, yyvstop+140},
> {yycrank+0, 0, yyvstop+143},
> {yycrank+0, 0, yyvstop+146},
> {yycrank+0, 0, yyvstop+149},
> {yycrank+0, yysvec+7, 0},
> {yycrank+0, 0, yyvstop+151},
> {yycrank+-168, yysvec+7, 0},
> {yycrank+0, yysvec+9, yyvstop+153},
> {yycrank+0, 0, yyvstop+155},
> {yycrank+0, 0, yyvstop+157},
> {yycrank+0, 0, yyvstop+159},
> {yycrank+-51, yysvec+12, 0},
> {yycrank+-196, yysvec+12, 0},
> {yycrank+0, 0, yyvstop+161},
> {yycrank+0, 0, yyvstop+163},
> {yycrank+0, 0, yyvstop+165},
> {yycrank+0, 0, yyvstop+167},
> {yycrank+0, 0, yyvstop+169},
> {yycrank+0, 0, yyvstop+171},
> {yycrank+128, 0, 0},
> {yycrank+324, 0, yyvstop+173},
> {yycrank+0, 0, yyvstop+175},
> {yycrank+403, 0, yyvstop+177},
> {yycrank+432, yysvec+22, yyvstop+179},
> {yycrank+199, 0, 0},
> {yycrank+153, 0, yyvstop+184},
> {yycrank+476, 0, 0},
> {yycrank+0, yysvec+22, yyvstop+187},
> {yycrank+118, 0, yyvstop+190},
> {yycrank+0, 0, yyvstop+192},
> {yycrank+0, 0, yyvstop+194},
> {yycrank+0, 0, yyvstop+196},
> {yycrank+119, 0, yyvstop+198},
> {yycrank+0, 0, yyvstop+200},
> {yycrank+73, yysvec+9, yyvstop+202},
> {yycrank+66, yysvec+9, yyvstop+204},
> {yycrank+83, yysvec+9, yyvstop+206},
> {yycrank+70, yysvec+9, yyvstop+208},
> {yycrank+90, yysvec+9, yyvstop+210},
> {yycrank+81, yysvec+9, yyvstop+212},
> {yycrank+99, yysvec+9, yyvstop+214},
> {yycrank+87, yysvec+9, yyvstop+216},
> {yycrank+102, yysvec+9, yyvstop+219},
> {yycrank+105, yysvec+9, yyvstop+221},
> {yycrank+107, yysvec+9, yyvstop+223},
> {yycrank+113, yysvec+9, yyvstop+225},
> {yycrank+111, yysvec+9, yyvstop+227},
> {yycrank+115, yysvec+9, yyvstop+229},
> {yycrank+112, yysvec+9, yyvstop+231},
> {yycrank+0, yysvec+9, yyvstop+233},
> {yycrank+115, yysvec+9, yyvstop+236},
> {yycrank+123, yysvec+9, yyvstop+238},
> {yycrank+121, yysvec+9, yyvstop+240},
> {yycrank+142, yysvec+9, yyvstop+242},
> {yycrank+132, yysvec+9, yyvstop+244},
> {yycrank+162, yysvec+9, yyvstop+246},
> {yycrank+171, yysvec+9, yyvstop+248},
> {yycrank+152, yysvec+9, yyvstop+250},
> {yycrank+147, yysvec+9, yyvstop+252},
> {yycrank+246, yysvec+9, yyvstop+254},
> {yycrank+150, yysvec+9, yyvstop+256},
> {yycrank+161, yysvec+9, yyvstop+258},
> {yycrank+166, yysvec+9, yyvstop+260},
> {yycrank+0, 0, yyvstop+262},
> {yycrank+0, 0, yyvstop+264},
> {yycrank+0, 0, yyvstop+266},
> {yycrank+0, 0, yyvstop+268},
> {yycrank+505, 0, 0},
> {yycrank+0, 0, yyvstop+270},
> {yycrank+319, yysvec+72, yyvstop+272},
> {yycrank+536, 0, 0},
> {yycrank+0, 0, yyvstop+275},
> {yycrank+316, 0, yyvstop+277},
> {yycrank+355, 0, 0},
> {yycrank+359, yysvec+123, yyvstop+282},
> {yycrank+389, yysvec+76, yyvstop+284},
> {yycrank+0, 0, yyvstop+287},
> {yycrank+0, 0, yyvstop+289},
> {yycrank+167, yysvec+9, yyvstop+291},
> {yycrank+162, yysvec+9, yyvstop+293},
> {yycrank+190, yysvec+9, yyvstop+295},
> {yycrank+188, yysvec+9, yyvstop+297},
> {yycrank+203, yysvec+9, yyvstop+299},
> {yycrank+203, yysvec+9, yyvstop+301},
> {yycrank+223, yysvec+9, yyvstop+303},
> {yycrank+224, yysvec+9, yyvstop+305},
> {yycrank+249, yysvec+9, yyvstop+307},
> {yycrank+243, yysvec+9, yyvstop+309},
> {yycrank+252, yysvec+9, yyvstop+311},
> {yycrank+257, yysvec+9, yyvstop+313},
> {yycrank+0, yysvec+9, yyvstop+315},
> {yycrank+257, yysvec+9, yyvstop+318},
> {yycrank+245, yysvec+9, yyvstop+320},
> {yycrank+0, yysvec+9, yyvstop+322},
> {yycrank+256, yysvec+9, yyvstop+325},
> {yycrank+281, yysvec+9, yyvstop+327},
> {yycrank+286, yysvec+9, yyvstop+329},
> {yycrank+292, yysvec+9, yyvstop+331},
> {yycrank+281, yysvec+9, yyvstop+333},
> {yycrank+300, yysvec+9, yyvstop+335},
> {yycrank+306, yysvec+9, yyvstop+337},
> {yycrank+317, yysvec+9, yyvstop+339},
> {yycrank+303, yysvec+9, yyvstop+341},
> {yycrank+306, yysvec+9, yyvstop+343},
> {yycrank+312, yysvec+9, yyvstop+345},
> {yycrank+329, yysvec+9, yyvstop+347},
> {yycrank+326, yysvec+9, yyvstop+349},
> {yycrank+333, yysvec+9, yyvstop+351},
> {yycrank+358, yysvec+9, yyvstop+353},
> {yycrank+364, yysvec+9, yyvstop+355},
> {yycrank+369, yysvec+9, yyvstop+357},
> {yycrank+360, yysvec+9, yyvstop+359},
> {yycrank+515, 0, 0},
> {yycrank+401, yysvec+162, yyvstop+361},
> {yycrank+551, 0, 0},
> {yycrank+0, 0, yyvstop+363},
> {yycrank+561, 0, 0},
> {yycrank+549, yysvec+166, yyvstop+366},
> {yycrank+0, 0, yyvstop+368},
> {yycrank+544, 0, yyvstop+370},
> {yycrank+367, yysvec+9, yyvstop+373},
> {yycrank+0, yysvec+9, yyvstop+375},
> {yycrank+368, yysvec+9, yyvstop+378},
> {yycrank+0, yysvec+9, yyvstop+380},
> {yycrank+0, yysvec+9, yyvstop+383},
> {yycrank+360, yysvec+9, yyvstop+386},
> {yycrank+385, yysvec+9, yyvstop+388},
> {yycrank+374, yysvec+9, yyvstop+390},
> {yycrank+384, yysvec+9, yyvstop+392},
> {yycrank+0, yysvec+9, yyvstop+394},
> {yycrank+0, yysvec+9, yyvstop+397},
> {yycrank+379, yysvec+9, yyvstop+400},
> {yycrank+379, yysvec+9, yyvstop+402},
> {yycrank+399, yysvec+9, yyvstop+404},
> {yycrank+0, yysvec+9, yyvstop+406},
> {yycrank+0, yysvec+9, yyvstop+409},
> {yycrank+401, yysvec+9, yyvstop+412},
> {yycrank+388, yysvec+9, yyvstop+414},
> {yycrank+385, yysvec+9, yyvstop+416},
> {yycrank+388, yysvec+9, yyvstop+418},
> {yycrank+391, yysvec+9, yyvstop+420},
> {yycrank+411, yysvec+9, yyvstop+422},
> {yycrank+402, yysvec+9, yyvstop+424},
> {yycrank+409, yysvec+9, yyvstop+426},
> {yycrank+416, yysvec+9, yyvstop+428},
> {yycrank+417, yysvec+9, yyvstop+430},
> {yycrank+418, yysvec+9, yyvstop+432},
> {yycrank+409, yysvec+9, yyvstop+434},
> {yycrank+417, yysvec+9, yyvstop+436},
> {yycrank+424, yysvec+9, yyvstop+438},
> {yycrank+0, yysvec+9, yyvstop+440},
> {yycrank+406, yysvec+9, yyvstop+443},
> {yycrank+422, yysvec+9, yyvstop+445},
> {yycrank+582, 0, 0},
> {yycrank+551, yysvec+203, yyvstop+447},
> {yycrank+424, yysvec+9, yyvstop+450},
> {yycrank+0, yysvec+9, yyvstop+452},
> {yycrank+0, yysvec+9, yyvstop+455},
> {yycrank+425, yysvec+9, yyvstop+458},
> {yycrank+428, yysvec+9, yyvstop+460},
> {yycrank+436, yysvec+9, yyvstop+462},
> {yycrank+428, yysvec+9, yyvstop+464},
> {yycrank+0, yysvec+9, yyvstop+466},
> {yycrank+431, yysvec+9, yyvstop+469},
> {yycrank+433, yysvec+9, yyvstop+471},
> {yycrank+441, yysvec+9, yyvstop+473},
> {yycrank+436, yysvec+9, yyvstop+475},
> {yycrank+470, yysvec+9, yyvstop+477},
> {yycrank+0, yysvec+9, yyvstop+479},
> {yycrank+482, yysvec+9, yyvstop+482},
> {yycrank+481, yysvec+9, yyvstop+484},
> {yycrank+496, yysvec+9, yyvstop+486},
> {yycrank+481, yysvec+9, yyvstop+488},
> {yycrank+494, yysvec+9, yyvstop+490},
> {yycrank+521, yysvec+9, yyvstop+492},
> {yycrank+0, yysvec+9, yyvstop+494},
> {yycrank+513, yysvec+9, yyvstop+497},
> {yycrank+514, yysvec+9, yyvstop+499},
> {yycrank+521, yysvec+9, yyvstop+501},
> {yycrank+0, yysvec+9, yyvstop+503},
> {yycrank+0, yysvec+9, yyvstop+506},
> {yycrank+511, yysvec+9, yyvstop+509},
> {yycrank+524, yysvec+9, yyvstop+511},
> {yycrank+0, yysvec+9, yyvstop+513},
> {yycrank+0, yysvec+9, yyvstop+516},
> {yycrank+542, yysvec+9, yyvstop+519},
> {yycrank+540, yysvec+9, yyvstop+521},
> {yycrank+535, yysvec+9, yyvstop+523},
> {yycrank+543, yysvec+9, yyvstop+525},
> {yycrank+0, yysvec+9, yyvstop+527},
> {yycrank+0, yysvec+9, yyvstop+530},
> {yycrank+0, yysvec+9, yyvstop+533},
> {yycrank+0, yysvec+9, yyvstop+536},
> {yycrank+0, yysvec+9, yyvstop+539},
> {yycrank+0, yysvec+9, yyvstop+542},
> {yycrank+543, yysvec+9, yyvstop+545},
> {yycrank+545, yysvec+9, yyvstop+547},
> {yycrank+531, yysvec+9, yyvstop+549},
> {yycrank+540, yysvec+9, yyvstop+551},
> {yycrank+548, yysvec+9, yyvstop+553},
> {yycrank+0, yysvec+9, yyvstop+555},
> {yycrank+549, yysvec+9, yyvstop+558},
> {yycrank+553, yysvec+9, yyvstop+560},
> {yycrank+558, yysvec+9, yyvstop+562},
> {yycrank+0, yysvec+9, yyvstop+564},
> {yycrank+537, yysvec+9, yyvstop+567},
> {yycrank+548, yysvec+9, yyvstop+569},
> {yycrank+0, yysvec+9, yyvstop+571},
> {yycrank+563, yysvec+9, yyvstop+574},
> {yycrank+569, yysvec+9, yyvstop+576},
> {yycrank+564, yysvec+9, yyvstop+578},
> {yycrank+0, yysvec+9, yyvstop+580},
> {yycrank+564, yysvec+9, yyvstop+583},
> {yycrank+565, yysvec+9, yyvstop+585},
> {yycrank+560, yysvec+9, yyvstop+587},
> {yycrank+0, yysvec+9, yyvstop+589},
> {yycrank+0, yysvec+9, yyvstop+592},
> {yycrank+0, yysvec+9, yyvstop+595},
> {yycrank+554, yysvec+9, yyvstop+598},
> {yycrank+0, yysvec+9, yyvstop+600},
> {yycrank+0, yysvec+9, yyvstop+603},
> {yycrank+0, yysvec+9, yyvstop+606},
> {yycrank+553, yysvec+9, yyvstop+609},
> {yycrank+556, yysvec+9, yyvstop+611},
> {yycrank+563, yysvec+9, yyvstop+613},
> {yycrank+573, yysvec+9, yyvstop+615},
> {yycrank+561, yysvec+9, yyvstop+617},
> {yycrank+571, yysvec+9, yyvstop+619},
> {yycrank+0, yysvec+9, yyvstop+621},
> {yycrank+560, yysvec+9, yyvstop+624},
> {yycrank+567, yysvec+9, yyvstop+626},
> {yycrank+580, yysvec+9, yyvstop+628},
> {yycrank+570, yysvec+9, yyvstop+630},
> {yycrank+565, yysvec+9, yyvstop+632},
> {yycrank+0, yysvec+9, yyvstop+634},
> {yycrank+0, yysvec+9, yyvstop+637},
> {0, 0, 0}};
> #endif
2439c2904
< #pragma ident "@(#)ncform 6.8 95/02/11 SMI"
---
> //#pragma ident "@(#)ncform 6.8 95/02/11 SMI"
diff -w npath/npath_yacc.c npath2/npath_yacc.c
198c198
< yyerror (
---
> void yyerror (
593a594
> #if !defined(CLEAN)
661a663,732
> #else
> {"IDENTIFIER", 257},
> {"CONSTANT", 258},
> {"STRING_LITERAL", 259},
> {"SIZEOF", 260},
> {"PTR_OP", 261},
> {"INC_OP", 262},
> {"DEC_OP", 263},
> {"LEFT_OP", 264},
> {"RIGHT_OP", 265},
> {"LE_OP", 266},
> {"GE_OP", 267},
> {"EQ_OP", 268},
> {"NE_OP", 269},
> {"AND_OP", 270},
> {"OR_OP", 271},
> {"MUL_ASSIGN", 272},
> {"DIV_ASSIGN", 273},
> {"MOD_ASSIGN", 274},
> {"ADD_ASSIGN", 275},
> {"SUB_ASSIGN", 276},
> {"LEFT_ASSIGN", 277},
> {"RIGHT_ASSIGN", 278},
> {"AND_ASSIGN", 279},
> {"XOR_ASSIGN", 280},
> {"OR_ASSIGN", 281},
> {"TYPE_NAME", 282},
> {"TYPEDEF", 283},
> {"EXTERN", 284},
> {"STATIC", 285},
> {"AUTO", 286},
> {"REGISTER", 287},
> {"GLOBALDEF", 288},
> {"GLOBALREF", 289},
> {"GLOBALVALUE", 290},
> {"READONLY", 291},
> {"NOSHARE", 292},
> {"_ALIGN", 293},
> {"_CHAR", 294},
> {"_SHORT", 295},
> {"_INT", 296},
> {"_LONG", 297},
> {"SIGNED", 298},
> {"UNSIGNED", 299},
> {"_DOUBLE", 300},
> {"CONST", 301},
> {"VOLATILE", 302},
> {"VOID", 303},
> {"_FLOAT", 304},
> {"STRUCT", 305},
> {"UNION", 306},
> {"_ENUM", 307},
> {"ELIPSIS", 308},
> {"RANGE", 309},
> {"VARIANT_STRUCT", 310},
> {"VARIANT_UNION", 311},
> {"CASE", 312},
> {"DEFAULT", 313},
> {"IF", 314},
> {"ELSE", 315},
> {"SWITCH", 316},
> {"WHILE", 317},
> {"DO", 318},
> {"FOR", 319},
> {"GOTO", 320},
> {"CONTINUE", 321},
> {"BREAK", 322},
> {"RETURN", 323},
> {"-unknown-", -1} /* ends search */
> #endif
920c991
< #pragma ident "@(#)yaccpar 6.12 93/06/07 SMI"
---
> //#pragma ident "@(#)yaccpar 6.12 93/06/07 SMI"
1031c1102
< register YYSTYPE *yypvt; /* top of value stack for $vars */
---
> register YYSTYPE *yypvt = 0; /* top of value stack for
> $vars */
diff -w npath/rex_util_y.c npath2/rex_util_y.c
868c868
< #pragma ident "@(#)yaccpar 6.12 93/06/07 SMI"
---
> //#pragma ident "@(#)yaccpar 6.12 93/06/07 SMI"
979c979
< register RRSTYPE *rrpvt; /* top of value stack for $vars */
---
> register RRSTYPE *rrpvt = 0; /* top of value stack for
> $vars */
diff -w npath/vperror.h npath2/vperror.h
31c31


< extern vperror_print ; /* 0 = no print, !0 = print
*/

---


> extern int vperror_print ; /* 0 = no print, !0 = print */

-------8<-------

Alex

Alexei A. Frounze

unread,
Jul 30, 2006, 5:07:22 AM7/30/06
to
Alexei A. Frounze wrote:
> Just wanted to share on the tools a bit...
...

What I found useful among various free tools (used myself for C code or
planned/planning):

Understanding Code:
- Red-hat Source Navigator: http://sourcenav.sourceforge.net/
- Cxref: http://www.gedanken.demon.co.uk/cxref/

Documenting Code:
- DoxyGen: http://www.stack.nl/~dimitri/doxygen/

Code Complexity Measurement:
- NPATH: http://www.geonius.com/software/tools/npath.html

Code Profiling and Code Coverage:
- GNU profiler (gprof)
- GNU coverage (gcov)

Combinatorial Code Testing:
- PICT and the co.: http://www.pairwise.org/

I had some fun applying NPATH and gcov to my FAT code. Not that I didn't
expect some of the results, but it gives a better idea of (potentially)
problematic places.

Alex

Simon Felix

unread,
Jul 30, 2006, 12:41:43 PM7/30/06
to
Alexei A. Frounze wrote:
> [...]

> I had some fun applying NPATH and gcov to my FAT code. Not that I didn't
> expect some of the results, but it gives a better idea of (potentially)
> problematic places.


considering the time you spend on your fat code it must become THE BEST
implementation of a fat driver.


or is it that fun?


--

----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----

Alexei A. Frounze

unread,
Jul 30, 2006, 1:33:31 PM7/30/06
to
Simon Felix wrote:
> Alexei A. Frounze wrote:
>> [...]
>> I had some fun applying NPATH and gcov to my FAT code. Not that I
>> didn't expect some of the results, but it gives a better idea of
>> (potentially) problematic places.
>
>
> considering the time you spend on your fat code it must become THE
> BEST implementation of a fat driver.

How do you know how much time I spend on it? :) You do know when I started
working on this particular implementation: April 2004 (comment statement).
You do know that the first release was in January 2005. But you that doesn't
tell you and you don't know how much time between those two instants was
spent on it, nor how much time has been spent on it since then and how much
time a few interested people have been waiting for certain fixes, which I
couldn't provide because had other things to do (e.g. work and other
hobbies).

> or is it that fun?

Well, considering that this implementation is more complete and better than
the original one written more than 5 years ago, yes. Considering that it's
bigger and more complicated, yes. Considering that there's a need to
optimize it now better, yes. Considering that I'm now testing it with
automated test suite (something I've rarely done for my hobby code) using
new tools, yes. Yes, it's all fun even though it's applied to an
implementation of something that's been very well known for decades and
there used to be other implementations.

Alex

0 new messages