I'am trying to figure out why the c++ code generation via bison failed. I'am using bison 2.1 and the m4 1.4.9. I try to call:
bison -d -v --skeleton=lalr1.cc InputParser.yacc
and get the error:
E:\work\Programmierung\Compiler\FlexBison\ToolChain>bison -d -v --skeleton=lalr1
.cc InputParser.yacc
m4:C:/PROGRA~1/GnuWin32/share/bison/lalr1.cc:22: cannot open `c:/progra~1/Bison/
share/bison/c++.m4': No such file or directory
bison: untergeordnetes Programm äm4ô fehlgeschlagen (R³ckgabewert 1)
The c++.m4 file is at C:\Programme\GnuWin32\share\bison. So why complain?
I'am using a batch file for that. As you can see there are some problems with the char set. Maybee this can be the error.
I also suddied a litle bit the m4 manual and set the M4PATH enviroment value to "C:\Programme\GnuWin32\share\bison".
Thanks!
Stefan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You don't have to set the M4PATH-Variable. But notice the difference between
the location you installed Bison to:
C:/PROGRA~1/GnuWin32/share/bison/lalr1.cc
and the location, where the c++.m4-file cannot be opened:
c:/progra~1/Bison/share/bison/c++.m4
The first one is .../BISON/share/... and the other one is .../GNUWIN32/share/... !!
So i just COPIED everything from the GnuWin32-directory to a new one called Bison, so that under both locations the files for the C++ Version can be found.
Best regards
Jens
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi!
I'am trying to figure out why the c++ code generation via bison failed. I'am using bison 2.1 and the m4 1.4.9. I try to call:
bison -d -v --skeleton=lalr1.cc InputParser.yacc
and get the error:
E:\work\Programmierung\Compiler\FlexBison\ToolChain>bison -d -v --skeleton=lalr1
.cc InputParser.yacc
m4:C:/PROGRA~1/GnuWin32/share/bison/lalr1.cc:22: cannot open `c:/progra~1/Bison/
share/bison/c++.m4': No such file or directory
bison: untergeordnetes Programm äm4ô fehlgeschlagen (R³ckgabewert 1)
The c++.m4 file is at C:\Programme\GnuWin32\share\bison. So why complain?
I'am using a batch file for that. As you can see there are some problems with the char set. Maybee this can be the error.
I also suddied a litle bit the m4 manual and set the M4PATH enviroment value to "C:\Programme\GnuWin32\share\bison".
Thanks!
Stefan
Hi Stefan,
I just got the same problem and solved it:
You don't have to set the M4PATH-Variable. But notice the difference between
the location you installed Bison to:
C:/PROGRA~1/GnuWin32/share/bison/lalr1.cc
and the location, where the c++.m4-file cannot be opened:
c:/progra~1/Bison/share/bison/c++.m4
The first one is .../BISON/share/... and the other one is .../GNUWIN32/share/... !!
So i just COPIED everything from the GnuWin32-directory to a new one called Bison, so that under both locations the files for the C++ Version can be found.
Best regards
Jens
There's still a problem though - it's not a good solution to copy duplicate files all over the place.
At a minimum, you should use a junction point :)
== John ==