X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com Date: Fri, 11 Sep 2015 06:22:05 +0200 (CEST) X-X-Sender: igor2 AT igor2priv To: "Britton Kerin (britton DOT kerin AT gmail DOT com) [via geda-user AT delorie DOT com]" X-Debug: to=geda-user AT delorie DOT com from="gedau AT igor2 DOT repo DOT hu" From: gedau AT igor2 DOT repo DOT hu Subject: Re: [geda-user] need a HID to read a pcb file? In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed 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 Thu, 10 Sep 2015, Britton Kerin (britton DOT kerin AT gmail DOT com) [via geda-user AT delorie DOT com] wrote: > It seems weird to me to need a HID to be able to parse the file > format. Is this a desired situation or did it just turn out this way? I hope it just turned out that way. I have many projects with embedded mini languages (for file formats usually) and I often use yacc. The standard approach in traditional yacc is that things are global and you need one language in one process. Some implementations like bison makes it possible to separate the parser a bit more, give it a namespace, make it reentrant, and so on, but it requires considerable extra effort. Normally you'd write a separate little lib that can save and load from/to a nice system of structs. But this whole "one language, everything is global" idea in traditional yacc somehow orients yacc users to just live with it and do everything in globals. Not sure this was the case in PCB, but this definelty was the case in some other projects I worked on. Regards, Igor2