www.delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2015/09/11/00:19:04

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]" <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: <CAC4O8c-3CLqwazysn=d0t2-aR=8piK=XVpnkpa3rDEV1V2+QMQ@mail.gmail.com>
Message-ID: <alpine.DEB.2.00.1509110615450.6924@igor2priv>
References: <CAC4O8c-3CLqwazysn=d0t2-aR=8piK=XVpnkpa3rDEV1V2+QMQ AT mail DOT gmail DOT com>
User-Agent: Alpine 2.00 (DEB 1167 2008-08-23)
MIME-Version: 1.0
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


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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019