Paul Eggert wrote:
josephus <[EMAIL PROTECTED]> writes:
Algol.h is made with bison -v -d algol.y
No, that command creates "algol.tab.h", not "algol.h". Nor does it
help if I manually rename the former to the latter; your stuff still
doesn't compile for me.
But I start with just what you have. I make the include file and make
any changes I need.
Can you please send a complete, self-contained test case, that
contains all the files that one would need to recreate the problem,
along with detailed instructions about how to reproduce it? I still
don't know what your problem is, and so I can't reproduce it.
I have a small problem with Bison.20.a It wants
sugarm4/sugarM4.m4 and it does not exist on my system.
This suggests that you have an installation problem on your host.
"make install" should have put m4sugar into a file with a name like
/usr/local/share/bison/m4sugar/m4sugar.m4, and Bison should be
able to use that file when it runs.
I have been trying to remake algol.h and I discovered that bison is not
working correctly at all. I thought it was working but I must have been
using an older algol.h. bison -v -d nualgol.y does not generate
nualgol.table and does not generate nualgol.tab.h
I found the m4 files in the bison source direct y, but there is no
m4sugar.m4
there is no sugar anything.
I have 'block.c' which was built on the ATARI with Berkley yacc. it
will parse a significant portion of the test.alg. this is the old yacc
built with K&R source and my flex. why doesnt bison do this?
*****
You were right I did not make install. I ran it and bison stared
working. It is not always clear what is required from the more complex
systems. I actually expected to just replace bison. It was the least
change to my system. I hate make install. It would mangle my file
system. not only would it maxed out the portion, it would overwrite
datafiles. I would have to manually repair the system or delete
everything and reinstall. I am working on this little compiler and I
really am tired of starting over.
I noticed that the .h file has a double wrapper. It doesn't seem to work
right. I understand that we don't want multiple includes. I am trying
to avoid that. all I do is rename the .h file.
bison is now working, but the parse tables are still insane. I recover
the grammar that parsed and bison still does not parse the test file.
In fact begin generates an error instead of a shift. I know how it
should work, because I built TSLRX. it is an SLR table generator. I
developed the basic grammars with it. I made it do most things YACC or
BISON could do. so I know that the tables are not sane. In TSLRX I
make the tables explicit and they are not compressed. I am familiar with
the way state tables work. so a reasonable expectation is first should
shift, it is not an error.
the grammars are not complex nor large. so the language is small.
i have somewhat complex expressions but mostly they are SLR.
hopefully I have been somewhat more helpful. I pay attention. And I
rally do try to take advice.
josephus
I start with algol.y and algol.l
bison -v -d algol.y
rename algol.tab.h algol.h
flex algol.l
compile and link.
the flex output will not terminate normally.
I have to put in an explicit exti(0);
then I test
talgol test.alg 1> err.lst 2>&1; vi err.lst
this is all there is to my process. No include souces, no file handling,
I dont want to debug anything but my little program. previously I could
parse various construcitons and the grammar was not entirley sane., but
it uould parse freely insane or not.