[PLUG] any bison/yacc experts want to check my work?
Keith Lofstrom
keithl at kl-ic.com
Thu Jul 12 06:22:44 UTC 2007
I don't understand yacc and bison; I don't expect to understand
without a lot more effort. I have other tasks to do first. I
am porting a program from windows tools to cygwin tools and open
source, and eventually to linux. The current build uses MKS
yacc ($400!!), and I hope to use cygwin bison instead.
When I run a legacy file foo.y through yacc on my linux box, it
makes foo.c properly, but fails with bison . I believe this is
because foo.y is written incorrectly and yacc is more permissive
than bison. It has lines like:
zz_len: ZZ_LEN '(' = { force_string = 1;};
>From my limited reading of the yacc and bison docs, the first
equals sign may be incorrect. I think it should be:
zz_len: ZZ_LEN '(' { force_string = 1;};
When I take out all the pesky extra = signs, the yacc.c file
that yacc builds is the same, except for some small and
unimportant white space changes. The new foo.y file also
works with bison. So I think this is the right thing.
The .y file is currently semi-confidential - the code I am open
sourcing hasn't been released yet. But I'm sure I can get
permission from the owner to share the file with a knowledgable
yacc/bison expert without hassle.
So: Any yacc/bison experts with a few minutes to critique a
.y file ?
Keith
--
Keith Lofstrom keithl at keithl.com Voice (503)-520-1993
KLIC --- Keith Lofstrom Integrated Circuits --- "Your Ideas in Silicon"
Design Contracting in Bipolar and CMOS - Analog, Digital, and Scan ICs
More information about the PLUG
mailing list