X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com Message-ID: <1364924842.3408.13.camel@AMD64X2.fritz.box> Subject: Re: [geda-user] C/C++ parsing library for PCB file format? From: Stefan Salewski To: geda-user AT delorie DOT com Date: Tue, 02 Apr 2013 19:47:22 +0200 In-Reply-To: <201301291656.r0TGuix1011799@envy.delorie.com> References: <1359476624 DOT 4235 DOT 9 DOT camel AT AMD64X2> <201301291656 DOT r0TGuix1011799 AT envy DOT delorie DOT com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.6.3 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Reply-To: geda-user AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: geda-user AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Tue, 2013-01-29 at 11:56 -0500, DJ Delorie wrote: > The file format is a flex/bison language, you could extract the parser > from the pcb source tree and use it as-is. > > Also, you could write your app as a pcb plugin and invoke it from > pcb's command line each time... I guess plugins will work only when written in C -- may C++ or even Vala work? For now I will try parsing direct from Ruby, Ruby is really good in RegExp processing. And I think chances are good that PCB's file format will never change any more... I have seen that kicad is using a similar text based file format like PCB, while Eagle seems to use bloat XML now. Question: For footprints we have now optional dimensions like nm -- is that restricted to footprint files, or can we have that in .pcb files too? I have just loaded a .pcb file and stored again -- seems to use 0.01 mil units. Is nm unit possible, so that I have to care for it when parsing? Other question: Can PCB read only one complete .pcb file, or can it merge multiple files, i.e. one which contains traces from an autorouter?