jonathan-beard / simple_wc_example

simple word count example using flex/bison parser
Apache License 2.0
139 stars 43 forks source link

Bison error: Variable not used #17

Closed songyang-dev closed 3 years ago

songyang-dev commented 3 years ago

Hello, I'm trying to build your project. I get this error during make about a variable inside the yy that is not used.

$ make
[ 14%] [BISON][mc_parser] Building parser with bison 3.0.4
mc_parser.yy:12.9-24: error: %define variable 'api.parser.class' is not used
 %define api.parser.class {MC_Parser}
         ^^^^^^^^^^^^^^^^
make[2]: *** [CMakeFiles/my_wc.dir/build.make:74: mc_parser.tab.cc] Error 1
make[1]: *** [CMakeFiles/Makefile2:82: CMakeFiles/my_wc.dir/all] Error 2
make: *** [Makefile:101: all] Error 2
songyang-dev commented 3 years ago

It may be because my bison is not the newest version

jonathan-beard commented 3 years ago

Could be, I'm unfortunately not going to have time till the weekend to check out. I'll do my best , but that's likely the earliest.

On Wed, Jun 2, 2021 at 1:47 PM Song Yang @.***> wrote:

It may be because my bison is now the newest version

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jonathan-beard/simple_wc_example/issues/17#issuecomment-853295553, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI6N3RVLS25IF4L66472FLTQZ4F3ANCNFSM4553BG2A .

--

Dr. Jonathan C. Beard | website http://www.jonathanbeard.io | linkedin https://www.linkedin.com/in/jonathanbeard | fastdata http://www.fastdata.io | arm http://www.arm.com Researcher, Adviser, Mentor

songyang-dev commented 3 years ago

I solved the issue. I had to update my bison to latest. Since I'm on Cygwin, I had to build bison from source code and link up the executable inside my /bin/. Thank god my flex is up to date or I would have to figure out how to link the libraries without using Cygwin's installer manager!