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

Dynamic code with macros is not parsed properly #2197

Open
bhappel-ciena opened this issue Jun 11, 2024 · 0 comments
Open

Dynamic code with macros is not parsed properly #2197

bhappel-ciena opened this issue Jun 11, 2024 · 0 comments
Labels
rejects-valid syntax If the parser wrongly rejects syntactically valid code (according to SV-2017).

Comments

@bhappel-ciena
Copy link

Describe the bug

Code that is dynamically generated with IF ELSE macros at compile time does not get parsed properly.

To Reproduce

// Input to the formatter, preferably a reduced test case.
`ifdef OPTION
option_module #() u_my_module (
`else
default_module #() u_my_module (
`endif
    .my_signal(),
    .more_signals()
);

Include any options used.

Actual behavior:

Did it reject valid code? or crash?

This code is rejected as a syntax error

Expected behavior

I would expect code that compiles to be able to be parsed without throwing a syntax error.

@bhappel-ciena bhappel-ciena added the rejects-valid syntax If the parser wrongly rejects syntactically valid code (according to SV-2017). label Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rejects-valid syntax If the parser wrongly rejects syntactically valid code (according to SV-2017).
Projects
None yet
Development

No branches or pull requests

1 participant