python parser

Christopher Subich spam.csubich+block at block.subich.spam.com
Tue Jul 12 22:00:29 CEST 2005


tuxlover wrote:
> I have to write a verilog parser in python for a class project. I was
> wondering if all you folks could advise me on choosing the right python
> parser module. I am not comfortable with lex/yacc and as a result find
> myself strugging with any module which use lex/yacc syntax/philosophy.
> pyparser looks good to me, but before I dive into it, I would really
> appreciate feedback from members of this group

I've had good luck with DParser for Python 
(http://staff.washington.edu/sabbey/dy_parser/index.html); in fact, it 
might even be a very easy translation from a premade Verilog grammar to 
a DParser grammar (Google search if you don't have BNF for Verilog already).

Two caevats come to mind, though; documentation isn't as newbie-friendly 
as it could be, and DParser requires a binary library -- it's not 
Python-only, which might matter for your project.



More information about the Python-list mailing list