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

Re: gEDA-user: PCB format wishlist



On Sep 6, 2010, at 9:48 AM, Stephan Boettcher wrote:

> John Doty <jpd@xxxxxxxxx> writes:
> 
>> On Sep 5, 2010, at 10:43 AM, Stephan Boettcher wrote:
>> 
>>> Yes, the gschem file format is much less accessible for
>>> hand/awk/sed-editing than the pcb file format.  
>> 
>> Huh? gschem format is *trivial* to parse in awk. Use rules like:
>> 
>> $1==L {
>> 	x1 = $2
>> 	y1 = $3
>> 	...
> 
> But the meat is in the following lines, those things I'd want to mangle.  

Well, either grab the interesting lines directly, make your rules stateful (set a flag when you are processing an "interesting" component, for example), or put the parsed data into an associative array that you then process with your END rule. It doesn't seem hard to me, anyway.

> 
>> Or for simple things just skip the symbolic names. XML is much harder.
> 
> Oh yes, XML is horrible.  
> 
> -- 
> Stephan Böttcher                     FAX: +49-431-880-3968
> Extraterrestrische Physik            Tel: +49-431-880-2508
> I.f.Exp.u.Angew.Physik               mailto:boettcher@xxxxxxxxxxxxxxxxxx
> Leibnizstr. 11, 24118 Kiel, Germany
> 
> 
> _______________________________________________
> geda-user mailing list
> geda-user@xxxxxxxxxxxxxx
> http://www.seul.org/cgi-bin/mailman/listinfo/geda-user

John Doty              Noqsi Aerospace, Ltd.
http://www.noqsi.com/
jpd@xxxxxxxxx




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