delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2019/03/06/11:34:13

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6
X-Exmh-Isig-CompType: repl
X-Exmh-Isig-Folder: inbox
From: karl AT aspodata DOT se
To: geda-user AT delorie DOT com
Subject: Re: [geda-user] guile auto-compile failure
In-reply-to: <alpine.DEB.2.20.1903061614020.1851@nimbus>
References: <20190306122848 DOT 55A4185E7F4C AT turkos DOT aspodata DOT se> <alpine DOT DEB DOT 2 DOT 20 DOT 1903061614020 DOT 1851 AT nimbus>
Comments: In-reply-to Roland Lutz <rlutz AT hedmen DOT org>
message dated "Wed, 06 Mar 2019 16:23:30 +0100."
Mime-Version: 1.0
Message-Id: <20190306163206.376A585E7F52@turkos.aspodata.se>
Date: Wed, 6 Mar 2019 17:32:06 +0100 (CET)
X-Virus-Scanned: ClamAV using ClamSMTP
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

Roland Lutz:
> On Wed, 6 Mar 2019, karl AT aspodata DOT se wrote:
> > $ gsch2pcb small.sch
> > /home/karl/git/openhw/boards_arm_aspo/stm32f105_can/Test_4/./simple.sym:2: error: failed to parse text object
> > ERROR: Failed to load 'small.sch':
> > Failed to run gnetlist
> 
> I just realized that this is the file you posted in your other mail.
> 
> The line which triggers the error is the first text object:
> > T   400  3194   5 10  0 0   0 0 1
> 
> The problem are the extra spaces.  The old parsing routine just silently 
> ignores them,

That is perfectly fine with me.

> but they are not allowed by the file format specification, 

 This one ?
http://wiki.geda-project.org/geda:file_format_spec

 I find no indication whatsoever that only one space is allowed as a
field separator.

> so the new checks signal an error.

 It seems it stopped complaining after rm -rf'ed the ~/.cache/guile/....

$ gschem small.sch
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-auto-compile argument to disable.
;;; compiling /usr/local/share/gEDA/scheme/gschem/keymap.scm
;;; WARNING: compilation of /usr/local/share/gEDA/scheme/gschem/keymap.scm failed:
;;; ERROR: In procedure module-lookup: Unbound variable: %switch-action-mode-hook
^C
$ gschem simple.sym 
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-auto-compile argument to disable.
;;; compiling /usr/local/share/gEDA/scheme/gschem/keymap.scm
;;; WARNING: compilation of /usr/local/share/gEDA/scheme/gschem/keymap.scm failed:
;;; ERROR: In procedure module-lookup: Unbound variable: %switch-action-mode-hook
^C
$ 

> I believe it's pretty obvious that aligning fields to a certain column 
> makes sense for human-written files,

Yes.

> even though it may make processing 
> the files with simple tools slightly more complicated;

Its just a my @fld = split; in perl, guess python isn't worse.
In c you can use strtok() or steel ideas/code from my parse.h/parse.c
in http://aspodata.se/git/c/libaspoutil/ if you whish.

> i.e. it's a bug in the specification.

There are a few bugs, or grey areas, in the spec., yes.

Regards,
/Karl Hammar


- Raw text -


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