Hi Patrick and other noweb gurus -- Since I still can't compile gschem (x_multiattrib) without a noweb installation on my machine I thought I'd take a look at the notangle_guile script. It's a very logical script, and the code is also well commented, which is good.
It looks to me like you've written the multiattrib widget to encapsulate it's own functions, instead of instantiating them globally inside the file x_multiattrib.nw. By looking at notangle_guile I am guessing that the script can't deal with the implied hierarchy (scoping) in the multiattrib widget's noweb code since notangle_guile doesn't recurse. Is this true? If I am correct, it looks to me like one just needs to add another conditional to tangle-step1 which detects the start of a new scope inside a fcn, and then (somehow) build the C source to reflect the new scope. So, if I am correct, do you have any ideas about what this should look like? I might try my hand at hacking notangle_guile if I can figure out what it should do. Of course, I could be totally wrong . . . . . BTW: It seems to me that tangle-step1 reads in the noweb file & builds the C code in the variable current-code-chunk; I guess that you build a list of current code chunks from the various code chunks you find. Correct? It also looks like tangle-step2 takes the chunks and formats them and outputs them into the C file. Right? With some tips from you, I might be able to understand this thing. . . . :-) Happy hacking, Stuart
