[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: gsch2pcb deleting almost all elements



On Wed, 2008-09-10 at 11:02 +0200, David Kuehling wrote:
> Hi,
> 
> after some debugging I found the error: One of my m4 fooprints ended on
> the following line:
> 
>   ElementLine [-7186 7283 7186 7283 800])
> 
> Note that the paren ')' terminating the element does not come on its own
> line.  
> 
> Now the parser in 'add_elements' overlooks the trailing paren, since the
> line was already processed via pcb_element_line_parse().
> 
> Since it is in 'skipping' mode, it will then consume all of the rest of
> the file, looking for another matching paren ')'.

Good catch!

[snip]

> So whose error is it now? :) Actually to be really safe, gsch2pcb would
> have to use the same file parser as 'pcb'.  Currently, even comment
> lines with '#' containtaining non-balanced parens will pose a problem to
> gsch2pcb.

We have talked many times about the need for gsch2pcb to defer actual
layout processing into PCB. I don't know if there are sufficiently
flexible PCB actions to do this without some work on PCB though.

In the short term, fixing up gsch2pcb's parser to be more correct would
be good. Handling parens on comment lines ought to be easy. Picking them
off the ends of lines - if the parser is working line-by-line, could be
a little trickier.

> I corrected my footprint and for now gsch2pcb seems to work ok (still
> dind't check the result in details, though).

Brilliant.

Best wishes,

-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)



_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user