Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't compile with bison 3.6.1, but bison 3.5.4 is no problem #2320

Closed
vowstar opened this issue May 13, 2020 · 0 comments · Fixed by #2321
Closed

Can't compile with bison 3.6.1, but bison 3.5.4 is no problem #2320

vowstar opened this issue May 13, 2020 · 0 comments · Fixed by #2321
Labels
new New issue not seen by maintainers

Comments

@vowstar
Copy link
Contributor

vowstar commented May 13, 2020

Can you attach an example that shows the issue? (Must be openly licensed, ideally in test_regress format.)

This code using bison 3.5.4 with no problem.
https://github.com/verilator/verilator/blob/master/src/verilog.y#L655-L673

But when I upgrade to bison 3.6.1, it have something break.

The original code :

%token<fl>		yVL_CLOCK		"/*verilator sc_clock*/"
%token<fl>		yVL_CLOCKER		"/*verilator clocker*/"
%token<fl>		yVL_NO_CLOCKER		"/*verilator no_clocker*/"
%token<fl>		yVL_CLOCK_ENABLE	"/*verilator clock_enable*/"
%token<fl>		yVL_COVERAGE_BLOCK_OFF	"/*verilator coverage_block_off*/"
%token<fl>		yVL_FULL_CASE		"/*verilator full_case*/"
%token<fl>		yVL_INLINE_MODULE	"/*verilator inline_module*/"
%token<fl>		yVL_ISOLATE_ASSIGNMENTS	"/*verilator isolate_assignments*/"
%token<fl>		yVL_NO_INLINE_MODULE	"/*verilator no_inline_module*/"
%token<fl>		yVL_NO_INLINE_TASK	"/*verilator no_inline_task*/"
%token<fl>		yVL_SC_BV		"/*verilator sc_bv*/"
%token<fl>		yVL_SFORMAT		"/*verilator sformat*/"
%token<fl>		yVL_PARALLEL_CASE	"/*verilator parallel_case*/"
%token<fl>		yVL_PUBLIC		"/*verilator public*/"
%token<fl>		yVL_PUBLIC_FLAT		"/*verilator public_flat*/"
%token<fl>		yVL_PUBLIC_FLAT_RD	"/*verilator public_flat_rd*/"
%token<fl>		yVL_PUBLIC_FLAT_RW	"/*verilator public_flat_rw*/"
%token<fl>		yVL_PUBLIC_MODULE	"/*verilator public_module*/"
%token<fl>		yVL_SPLIT_VAR		"/*verilator split_var*/"

The code generated and can't compile

    yVL_CLOCK = 610,               /* "/*verilator sc_clock*/"  */
    yVL_CLOCKER = 611,             /* "/*verilator clocker*/"  */
    yVL_NO_CLOCKER = 612,          /* "/*verilator no_clocker*/"  */
    yVL_CLOCK_ENABLE = 613,        /* "/*verilator clock_enable*/"  */
    yVL_COVERAGE_BLOCK_OFF = 614,  /* "/*verilator coverage_block_off*/"  */
    yVL_FULL_CASE = 615,           /* "/*verilator full_case*/"  */
    yVL_INLINE_MODULE = 616,       /* "/*verilator inline_module*/"  */
    yVL_ISOLATE_ASSIGNMENTS = 617, /* "/*verilator isolate_assignments*/"  */
    yVL_NO_INLINE_MODULE = 618,    /* "/*verilator no_inline_module*/"  */
    yVL_NO_INLINE_TASK = 619,      /* "/*verilator no_inline_task*/"  */
    yVL_SC_BV = 620,               /* "/*verilator sc_bv*/"  */
    yVL_SFORMAT = 621,             /* "/*verilator sformat*/"  */
    yVL_PARALLEL_CASE = 622,       /* "/*verilator parallel_case*/"  */
    yVL_PUBLIC = 623,              /* "/*verilator public*/"  */
    yVL_PUBLIC_FLAT = 624,         /* "/*verilator public_flat*/"  */
    yVL_PUBLIC_FLAT_RD = 625,      /* "/*verilator public_flat_rd*/"  */
    yVL_PUBLIC_FLAT_RW = 626,      /* "/*verilator public_flat_rw*/"  */
    yVL_PUBLIC_MODULE = 627,       /* "/*verilator public_module*/"  */
    yVL_SPLIT_VAR = 628,           /* "/*verilator split_var*/"  */

What 'verilator --version' are you using? Did you try it with the git master version?

Source code from v4.032, v4.034, master

Would you be willing to try to fix Verilator yourself with assistance?

I reported a bug to bison
akimd/bison#38

@vowstar vowstar added the new New issue not seen by maintainers label May 13, 2020
vowstar added a commit to vowstar/verilator that referenced this issue May 13, 2020
Workaround issue: bison 3.6.1 generated unexpected nested-comment
Closes: verilator#2320
Signed-off-by: Huang Rui <vowstar@gmail.com>
vowstar added a commit to vowstar/verilator that referenced this issue May 13, 2020
Workaround issue: bison 3.6.1 generated unexpected nested-comment
I agreed with docs/CONTRIBUTING.adoc
Closes: verilator#2320
Signed-off-by: Huang Rui <vowstar@gmail.com>
gentoo-bot pushed a commit to gentoo/guru that referenced this issue May 13, 2020
After bison upgrade to 3.6.1, caused compile error.
bison 3.6.1 generated unexpected nested-comment,
but 3.5.4 is no problem.
This fix workaround it by remove unexpected nested
comment. The test pass.

Issue: akimd/bison#38
Issue: verilator/verilator#2320
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Huang Rui <vowstar@gmail.com>
vowstar added a commit to vowstar/verilator that referenced this issue May 13, 2020
Workaround issue: bison 3.6.1 generated unexpected nested-comment
I agreed with docs/CONTRIBUTING.adoc, add name in file.
Closes: verilator#2320
Signed-off-by: Huang Rui <vowstar@gmail.com>
vowstar added a commit to vowstar/verilator that referenced this issue May 13, 2020
Workaround issue: bison 3.6.1 generated unexpected nested-comment
I agreed with docs/CONTRIBUTING.adoc, add name in file.
Closes: verilator#2320
Signed-off-by: Huang Rui <vowstar@gmail.com>
wsnyder pushed a commit that referenced this issue May 13, 2020
Workaround issue: bison 3.6.1 generated unexpected nested-comment
Closes: #2320
Signed-off-by: Huang Rui <vowstar@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new New issue not seen by maintainers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant