ben-marshall / verilog-parser

A Flex/Bison Parser for the IEEE 1364-2001 Verilog Standard.
MIT License
126 stars 44 forks source link

Support for BISON 3.3.1 (or above) #25

Open Bo-Yuan-Huang opened 5 years ago

Bo-Yuan-Huang commented 5 years ago

Please delete or fill out each section as appropriate:


Issue Description

Current version requires BISON 3.0.4 or above (defined in CMakefiles.txt). However, it does not build under BISON 3.3.1 (version from homebrew formulae ).

What should happen:

Library build pass.

What actually happens:

/usr/bin/m4:/usr/share/bison/skeletons/yacc.c:1652: undefined macro `b4_symbol(610, has_type)'
/usr/bin/m4:/usr/share/bison/skeletons/yacc.c:1652: undefined macro `b4_symbol(610, has_type)' 
/usr/share/bison/skeletons/yacc.c:1652: error: b4_symbol_if: field has_type of 610 is not a Boolean: 
/usr/share/bison/skeletons/yacc.c:1652: the top level                                                
/root/verilog-parser/src/verilog_scanner.l:3:14: fatal error: verilog_parser.tab.h: No such file or directory
     #include "verilog_parser.tab.h"

Steps to re-create:

Describe exactly how to re-create the bug.

$> install bison 3.3.1
$> make 

People to Notify:

Related Issues:

ben-marshall commented 5 years ago

Hi, thanks for raising this.

I'm afraid I don't have access to a Mac (which I assume is what you're running given you talked about homebrew?) and so cannot re-produce this issue.

From your error, it seems like the problems lie inside the bison installation? I doubt this is a bug in Bison, but it does seem your installation might not be working as it should.

If you find a way to fix it on your local machine, I will happily look at a pull request, but since I cannot repeat the issue, I am hesitant to make changes to the repo as is.

Bo-Yuan-Huang commented 5 years ago

The error exists in both Ubuntu (16.04, 18.04) and OSX when installing the official release. The error message above is actually copied from the Ubuntu environment.

I tried to fix it, but due to my limited knowledge in BISON, I didn't find a way to solve it and let's why I raise the issue here.

ben-marshall commented 5 years ago

Ah, I see. Fair enough.

I'll leave the issue open in case anyone else has the same problem. I'm sorry I don't have a solution / the time to find one right now.

Is this a show stopper for your project or can you use another version of Bison?

Bo-Yuan-Huang commented 5 years ago

I can roll back to a previous version to bypass this issue. Thanks anyway!