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

Fails to parse correct code #81

Open
numero-744 opened this issue Mar 4, 2025 · 0 comments
Open

Fails to parse correct code #81

numero-744 opened this issue Mar 4, 2025 · 0 comments

Comments

@numero-744
Copy link

Hi there 👋

I have tried to use mergiraf on https://github.com/openhwgroup/cva6/blob/master/core/scoreboard.sv and it fails to parse this file using tree-sitter-verilog.
The scoreboard.sv file is correctly parsed by verilator, questa and vcs, but not by tree-sitter-verilog 🤔
Well, CVA6 looks like an interesting playground for integration testing 😉

There seem to be different errors that I have not yet identified.
(Maybe system tasks (eg: $clog2) and for loops?)

I have reproduced the issue running tree-sitter-cli directly.

% tree-sitter parse --scope source.verilog core/scoreboard.sv
...
core/scoreboard.sv	Parse:    3.94 ms	 3893 bytes/ms	(ERROR [121, 4] - [121, 61])

Is there anybody motivated to fix this?
Else I can have a look this week-end.

I have the following document:

SystemVerilog 3.1a
Language Reference Manual
Accellera’s Extensions to Verilog®

It seems the standard you have implemented is not the one I have.
The sections have changed so I cannot map between grammar.js and the specification.

PS: Wondering if tree-sitter performs pre-processing for `include and macros.
Otherwise, are there workarounds to avoid false errors on ugly but correct code?

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

No branches or pull requests

1 participant