[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Axiom-developer] Re: noweb
From: |
Page, Bill |
Subject: |
RE: [Axiom-developer] Re: noweb |
Date: |
Wed, 3 May 2006 21:34:09 -0400 |
Gaby,
Thanks for your continuing work on the Axiom Silver branch! :)
On Wednesday, May 03, 2006 4:36 PM you wrote:
> ...
> Tim Daly (root) wrote:
> | modules.c is one way to fix the noweb bug. i've submitted it
> | as a patch to norman ramsey but he rejected it saying that i
> | should use sed/awk to fix the problem rather than patch the
> | C code. unfortunately i'm not a sed/awk programmer so rather
> | than learn two new tools i simply kept the patch (which works).
>
> Can you give me a test for detecting the problem, or at least
> a detailed description of how to reproduce it? Did Norman
> Ramsey suggest on which file you should use the sed/awk fix?
> Again, I'm willing to help out that issue: It stands in my
> way of making progress on the build machinery stuff.
Please forgive my irritation but this issue *has* been discussed
repeatedly on this list. Most recently see:
http://lists.gnu.org/archive/html/axiom-developer/2005-12/msg00226.html
Here is the awk script again since the version stored in the
axiom-developer archive is mangled because it confuses some of
script with an email address:
axiom-noweb:
------------
#!/bin/sh
awk '
/@use / { uses [substr($0, 6)] = 1 }
/@defn / { defns[substr($0, 7)] = 1 }
{ print }
END {
for (i in uses)
if (!defns[i])
printf "@begin address@hidden address@hidden@text <<%s>>address@hidden
code\n", i,
i
}'
exit 0
# test with
sed '1,/test with/d' $0 | notangle -filter $0
<<*>>=
return x << 2 >> 2;
@
--------
All we have to do is include this script with the Axiom
distribution and call it as a filter as he shows.
% notangle -filter axiom-noweb
Really, this script is not so hard to understand is it? The
documentation for noweb filters is here:
http://www.literateprogramming.com/noweb_hacker.pdf
--------
Regards,
Bill Page.