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

Preprocessor: Whtespace after `define was not kept. #1725

Open
puffsun opened this issue Feb 17, 2023 · 1 comment
Open

Preprocessor: Whtespace after `define was not kept. #1725

puffsun opened this issue Feb 17, 2023 · 1 comment
Assignees
Labels
rejects-valid syntax If the parser wrongly rejects syntactically valid code (according to SV-2017).

Comments

@puffsun
Copy link

puffsun commented Feb 17, 2023

Describe the bug

Sorry if I'm choose a wrong issue type. The issue is related to SystemVerilog preprocessor. After preprocessing include directives, a whitespace should be kept after each define. Please help.

Short summary.

The whitespace should be kept after `define.

To Reproduce

The included code is like:
included.v:

`ifndef SOMETHING
`define SOMETHING
  ...
`endif

top.v:

```systemverilog
`include "included.v"

module dummy_module(input clk);
endmodule

After preprocessing top.v, the output would be:

`defineSOMETHING
...

module dummy_module(input clk);
endmodule

Include any options used.

Actual behavior:
The file can be preprocessed without error, but the result is not fully expected.

Did it reject valid code? or crash?
No

Expected behavior

The whitespace after `define should be kept, or it will be invalid code.

A clear and concise description of what you expected to happen. Citations to the
SystemVerilog-2017 Standard (LRM)
would help.

@puffsun puffsun added the rejects-valid syntax If the parser wrongly rejects syntactically valid code (according to SV-2017). label Feb 17, 2023
@hzeller
Copy link
Collaborator

hzeller commented Feb 21, 2023

This is probably related to #1376 just before the GSoC time was running out.
Tom, we should get Karim on board :)

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

3 participants