axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-developer] RE: noweb "bug" (was: article "standard" header/footer


From: Page, Bill
Subject: [Axiom-developer] RE: noweb "bug" (was: article "standard" header/footer)
Date: Wed, 14 Dec 2005 12:47:10 -0500

Ralf, 

On Wednesday, December 14, 2005 7:56 AM you wrote:
> 
> By the way, try the following in AXIOMROOT.
> 
> find . -name '*.pamphlet' -exec grep "<<.*>>" {} \; > xxx.1
> grep -v ">>= *$" xxx.1 > xxx.2
> grep -v ">> *$"  xxx.2 > xxx.3
> grep -v "@<<"    xxx.3 > xxx.4
> wc xxx.4
>    86  472 4836 xxx.4
> 
> Look at these 86 lines. I've only found
> 
> Label:          '<<' Name '>>' ;
> 
> (which is from ./src/interp/fnewmeta.lisp.pamphlet)
> where Tim's problem occurs. So do we have the noweb patch 
> just for this line?

I think you are correct.

We are actually looking for any occurrence of <<xxxxx>> where
there is no corresponding <<xxxxxx>>= in the same file. I don't
think we can do that properly using just grep.

Here is another simple script based on Norman Ramsey's awk
original idea that I think finds all these occurrences:

-----
for i in src lsp zips; do find $i -name '*.pamphlet' -exec awk '
/<<.*>>/  { match($0,/<<.*>>/); uses [substr($0, RSTART,RLENGTH)] = 1 }
/<<.*>>=/ {match($0,/<<.*>>/); defns[substr($0, RSTART,RLENGTH)] = 1 }
END {
  for (i in uses)
    if (!defns[i])
      printf "{}: %s\n",i
}' {} \; ; done;
----------------

When I run this I get:

address@hidden page]$ cd $AXIOM/../..
address@hidden axiom--main--1]$ for i in src lsp zips; do find $i
-name
'*.pamphlet' -exec awk '
> /<<.*>>/  { match($0,/<<.*>>/); uses [substr($0, RSTART,RLENGTH)] = 1
}
> /<<.*>>=/ {match($0,/<<.*>>/); defns[substr($0, RSTART,RLENGTH)] = 1 }
> END {
>   for (i in uses)
>     if (!defns[i])
>       printf "{}: %s\n",i
> }' {} \; ; done;

src/hyper/bitmaps.pamphlet: <<license>>
src/hyper/token.pamphlet: <<token.c>>
src/doc/axiom.sty.pamphlet: <<ref value>>}{<<page
number>>}{<<text>>}}{<<hyper category>>}{<<URL>>
src/doc/axiom.sty.pamphlet: <<ref value>>}{<<page number>>
src/doc/booklet.c.pamphlet: <<file:filename1>>@<<file:filename2>>
src/doc/booklet.c.pamphlet: <<http:web>>
src/doc/booklet.c.pamphlet: <<file:filename2>>
src/doc/booklet.c.pamphlet: << and >>
src/doc/booklet.c.pamphlet: <<file:filename>>
src/doc/booklet.c.pamphlet: <<file:PATH-AND-FILENAME>>
src/doc/Rosetta.pamphlet: <<x; y>>
src/interp/fnewmeta.lisp.pamphlet: <<' Name '>>
lsp/Makefile.pamphlet: <<gcl-2.6.5w.toploop.patch>>

address@hidden axiom--main--1]$

--------

So these are all the files that contain what appear to be
undefined chunks. Some of these currently depend on Tim's
patch to noweb to be processed properly.

Perhaps the following are actually inconsequential errors in
the source files:

  src/hyper/bitmaps.pamphlet: <<license>>
  src/hyper/token.pamphlet: <<token.c>>
  lsp/Makefile.pamphlet: <<gcl-2.6.5w.toploop.patch>>

The only real occurrence in a code chunk is the one you already
found:

  src/interp/fnewmeta.lisp.pamphlet: <<' Name '>>

This one is definitely processed incorrectly by an unmodified:

  $ notangle -R'fnew.meta' src/interp/fnewmeta.lisp.pamphlet

but Norman's filter works:

  $ notangle -filter ~/axiom-noweb -R'fnew.meta' \
       src/interp/fnewmeta.lisp.pamphlet

---------

Since we have also been talking about the Debian build of Axiom,
it occurs to me to wonder how this is handled on Debian?

If no special noweb modifications are made, then perhaps this
error in 'src/interp/fnewmeta.lisp.pamphlet' gets by undetected?

Or does the Debian build actually rebuild noweb?

Regards,
Bill Page.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]