bug-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: a probalem with Bison


From: josephus
Subject: Re: a probalem with Bison
Date: Tue, 07 Jun 2005 09:27:39 -0500
User-agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.8) Gecko/20050511

Paul Eggert wrote:

josephus <address@hidden> writes:


bison -v -d nualgol.y does not generate nualgol.table and does not
generate nualgol.tab.h


Unfortunately you haven't sent us a file named nualgol.y, so it won't
be easy for us to reproduce the problem.


I found the m4 files in the bison source direct y, but there is no
m4sugar.m4 there is no sugar anything.


This sounds like Bison wasn't installed correctly in your machine.
For example, if you installed Bison 2.0a by running the commands
"configure; make; make install" then you should be running the command
"/usr/local/bin/bison" and you should observe something like the
following behavior when you are running the shell:

   $ type bison
   bison is /usr/local/bin/bison
   $ find /usr/local/share/bison -name '*m4sugar*' -print
   /usr/local/share/bison/m4sugar
   /usr/local/share/bison/m4sugar/m4sugar.m4

If you get different behavior, then your Bison wasn't installed
correctly, and that is what you need to be looking at.



make install ... would mangle
my file system. not only would it maxed out the portion, it would
overwrite datafiles.


Please install into some other area, then.  For example:

   $ configure --prefix=/my/location
   $ make
   $ make install

This will install into /my/location/bin/bison, etc., rather than
/usr/local/bin/bison.  You can then repair things later by removing
/my/location.


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.


I cannot reproduce the problem with the code that you submitted.  Can
you please resubmit exactly what you have now, using a gzipped tar
file as before?  Apparently you've made some changes.  Here's my
attempt to reproduce it:

   bash-2.05a$ bison -v -d algol.y
   bash-2.05a$ mv algol.tab.h algol.h
   bash-2.05a$ flex algol.l
   bash-2.05a$ make
   gcc -g -c lex.yy.c
   algol.l: In function 'yylex':
   algol.l:47: error: 'LONG' undeclared (first use in this function)
   algol.l:47: error: (Each undeclared identifier is reported only once
   algol.l:47: error: for each function it appears in.)
   algol.l:80: error: 'MOD' undeclared (first use in this function)
   algol.l: In function 'init':
   algol.l:150: error: invalid lvalue in assignment
   algol.l:153: error: invalid lvalue in assignment
   algol.l: In function 'symbol':
   algol.l:171: error: invalid lvalue in assignment
   algol.l:175: error: invalid lvalue in assignment
   algol.l:185: error: invalid lvalue in assignment
   algol.l: In function 'main':
   algol.l:220: warning: incompatible implicit declaration of built-in function 
'strcpy'
   make: *** [lex.yy.o] Error 1


I tarred up my various sources and .h files and fixed the makefile to work. There is a Tools textile with all the versions.

I included block.c which can be compiled and linked with lexyy.o It will partially parse some text. I do not have the original source just the intermediate source file.

make a workspace and untar the data.

Attachment: JOE.TAR
Description: Unix tar archive


reply via email to

[Prev in Thread] Current Thread [Next in Thread]