Mail Archives: geda-user/2019/03/06/11:34:13
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 -