gEDA-dev: gerbv mis-parses aperture macro definitions

Stefan Petersen spe at stacken.kth.se
Wed Aug 9 16:18:42 EDT 2006


Bernd Jendrissek wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Below is a reduced gerber from a board we produce that I tried to view
> with gerbv.  It looked good where it was right but unfortunately it had
> some ghastly diagonal lines across several layers.
>
> The problem seems to be that gerbv cannot parse the following two lines
> in the aperture macro MTHOLE definition:
>
> $1=$1-$2*
> $1=$1/2*
>   
Major bummer. That is something I have never seen before. But a very 
quick look at
the standard says that it should be OK to do like that.



> I had a look through src/amacro.c and unfortunately fixing this would
> exceed the trivial-change copyrightability threshold.  It would need
> either a proper precedence-aware parse, or a simple right-to-left rule.
>   
A patch or a complete rewrite is always welcome. You get the copyright 
for the file,
no problem. It just has to be released under the GPL...


> There's an implementation of infix to postfix conversion at
> http://andrewd.ces.clemson.edu/courses/cpsc215/spring01/hw/asg2/cal.c
> The comment right above in2post() outlines the algorithm.
>   


I hardly have time to hack gerbv as it is, non the less this thing. I 
can add it to the buglist
on sourceforge as a reminder for any given intrested to take over to 
solve this problem.
Or anyone else that can spend some quality time on this. I was quite 
proud that I came up
with the idea to convert aperture macros to a simple stack based 
language, but o no...


Regards,
/spe


More information about the geda-dev mailing list