[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: a probalem with Bison
From: |
Paul Eggert |
Subject: |
Re: a probalem with Bison |
Date: |
Mon, 06 Jun 2005 09:38:33 -0700 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux) |
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
- a probalem with Bison, josephus, 2005/06/03
- Re: a probalem with Bison, Hans Aberg, 2005/06/03
- Re: a probalem with Bison, Paul Eggert, 2005/06/05
- Message not available
- Re: a probalem with Bison, Paul Eggert, 2005/06/05
- Re: a probalem with Bison, josephus, 2005/06/05
- Re: a probalem with Bison, josephus, 2005/06/06
- Re: a probalem with Bison,
Paul Eggert <=
- Re: a probalem with Bison, josephus, 2005/06/06
- Re: a probalem with Bison, josephus, 2005/06/07
- Re: a probalem with Bison, Paul Eggert, 2005/06/07
- Message not available
- Re: a probalem with Bison, Paul Eggert, 2005/06/10
- Re: a probalem with Bison, josephus, 2005/06/11