You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
note: 'pluscolon' (at %s) % self.lineno
It does parse a lot of verilog, but doesn't seem to be maintained much, and I've found a number of places where it fails (with the fixes not obvious and potentially breaking at updates). I've also tried PyParsing's verilog example, which does a pretty good job of accepting the verilog code; it is not clear (to me) how to go from what it recognizes to an AST table. It seems (again to me) that a good parser for verilog in Python does not exist. I believe there are some good verilog parser in C/C++ (iverilog, yosys) and maybe tcl (xchem), but nothing that doesn't require a lot of work in Python? Ideally, it's just my lack of information, but if anyone knows of a good verilog parser, it would be good to know?
Activity
kwmartin commentedon Jun 24, 2025
It seems at least not correctly, see the following ast code
note:
'pluscolon' (at %s) % self.linenoIt does parse a lot of verilog, but doesn't seem to be maintained much, and I've found a number of places where it fails (with the fixes not obvious and potentially breaking at updates). I've also tried PyParsing's verilog example, which does a pretty good job of accepting the verilog code; it is not clear (to me) how to go from what it recognizes to an AST table. It seems (again to me) that a good parser for verilog in Python does not exist. I believe there are some good verilog parser in C/C++ (iverilog, yosys) and maybe tcl (xchem), but nothing that doesn't require a lot of work in Python? Ideally, it's just my lack of information, but if anyone knows of a good verilog parser, it would be good to know?