We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When a localparam is encountered in the ANSI style parameter declaration, a parsing error is reported.
Example source verilog
module a_module #( localparam A = 2 )( input [A-1:0] sig ); endmodule
The resulting pyverilog output:
Generating LALR tables WARNING: 183 shift/reduce conflicts Traceback (most recent call last): File ".../pyverilog_test.py", line 14, in <module> ast, directives = parse(vlog) ^^^^^^^^^^^ File ".../.venv/lib/python3.12/site-packages/pyverilog/vparser/parser.py", line 2338, in parse ast = codeparser.parse() ^^^^^^^^^^^^^^^^^^ File ".../.venv/lib/python3.12/site-packages/pyverilog/vparser/parser.py", line 2316, in parse ast = self.parser.parse(text, debug=debug) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File ".../.venv/lib/python3.12/site-packages/pyverilog/vparser/parser.py", line 77, in parse return self.parser.parse(text, lexer=self.lexer, debug=debug) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File ".../.venv/lib/python3.12/site-packages/ply/yacc.py", line 333, in parse return self.parseopt_notrack(input, lexer, debug, tracking, tokenfunc) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File ".../.venv/lib/python3.12/site-packages/ply/yacc.py", line 1201, in parseopt_notrack tok = call_errorfunc(self.errorfunc, errtoken, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File ".../.venv/lib/python3.12/site-packages/ply/yacc.py", line 192, in call_errorfunc r = errorfunc(token) ^^^^^^^^^^^^^^^^ File ".../.venv/lib/python3.12/site-packages/pyverilog/vparser/parser.py", line 2268, in p_error self._raise_error(p) File ".../.venv/lib/python3.12/site-packages/pyverilog/vparser/parser.py", line 2279, in _raise_error raise ParseError("%s: %s" % (coord, msg)) pyverilog.vparser.parser.ParseError: line:3: before: "localparam"
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When a localparam is encountered in the ANSI style parameter declaration, a parsing error is reported.
Example source verilog
The resulting pyverilog output:
The text was updated successfully, but these errors were encountered: