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

Verible's formatter fails to lex/parse input #2359

Open
joaovam opened this issue Feb 20, 2025 · 1 comment
Open

Verible's formatter fails to lex/parse input #2359

joaovam opened this issue Feb 20, 2025 · 1 comment
Labels
formatter Verilog code formatter issues

Comments

@joaovam
Copy link

joaovam commented Feb 20, 2025

Test case

module module_0 (  )  ; 
    assign  id_9  [  -1  -  -1  ]  =  0 ;  
endmodule

Command used: verible-verilog-format example.v --inplace

Actual output

example.v: Error lex/parsing-ing formatted output.  Please file a bug.
First error: token: "--" at 3:17-18:; problematic formatter output is
module module_0 ();
  assign id_9[-1--1] = 0;
endmodule

<<EOF>>

Version used

<unknown-git-version>
Commit  2025-02-06
Built   2025-02-20T11:40:59Z
@joaovam joaovam added the formatter Verilog code formatter issues label Feb 20, 2025
@hzeller
Copy link
Collaborator

hzeller commented Feb 20, 2025

ah interesting case. Yes, there should be a space before that unary op.

I am currently busy with some other things, but if you'd like to send a PR to fix this, I am happy to look at it. Otherwise it might take a while.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
formatter Verilog code formatter issues
Projects
None yet
Development

No branches or pull requests

2 participants