-
Notifications
You must be signed in to change notification settings - Fork 66
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
Error when preprocessing verilog header with dos line endings #180
Comments
Ieee1800.1 2017 does not specify carriage return (CR) as part in section A.9.4: Similarly the standard specify that source code should be ascii text... but some tool vendor support unicode at least in comments ... |
The issue is probably in lexer of the pre-processor grammar : https://github.com/Nic30/hdlConvertor/blob/master/grammars/verilogPreprocLexer.g4 |
I went into this error when I try to parse the Verilog description of the processor. The description is normally synthesizable by some commercial tools. |
@nxpMartin It is possible to hotfix this by normalization of newlines on input, but lets add it to grammar directly as it should not break anything and it should greatly improve user experience. |
Closing this as it is fixed in mesonbuild branch and will be merged to master soon. |
It looks like, there is a problem with the Verilog preprocessor for files that uses dos line endings.
Verilog multiple line macro definition works well in a header file with Unix line endings and causes an error like "SyntaxError:mismatched input 8'b0010_0100 expecting ...."
See params.v for details.
You can also clone (
git clone https://github.com/nxpMartin/hdl_analyzer.git -b verilog_preprocessor
) and runpytest
in the main directory to see it.The text was updated successfully, but these errors were encountered: