Re: any experience with PLY?

Nicola Musatti <nicola.musatti@gmail.com>
14 May 2007 01:28:49 -0700

          From comp.compilers

Related articles
any experience with PLY? marktxx@yahoo.com (Mark T) (2007-05-13)
Re: any experience with PLY? nicola.musatti@gmail.com (Nicola Musatti) (2007-05-14)
Re: any experience with PLY? joevans@gmail.com (Jason) (2007-05-14)
| List of all articles for this month |
From: Nicola Musatti <nicola.musatti@gmail.com>
Newsgroups: comp.compilers
Date: 14 May 2007 01:28:49 -0700
Organization: Compilers Central
References: 07-05-047
Keywords: tools, python
Posted-Date: 16 May 2007 03:00:47 EDT

On May 13, 9:08 pm, Mark T <mark...@yahoo.com> wrote:
> I'm contemplating using PLY to create a source to source translator -
> one assembler language (custom CPU) to another assembler language
> (standard CPU). I have some limited lex/yacc experience.


PLY was actually my first experience with a lex/yacc style generator
and I found it extremely convenient. Some theoretical background helps
in avoiding mistakes and diagnosing bugs, but one can always resort to
good ol' trial & error ;-)


I used PLY to parse a subset of SQL DDL. I already had a hand coded C+
+ parser for an even smaller subset, but I'm convinced that it took me
less to rewrite it in Python with PLY than it would have taken to
modify my C++ one.


Another advantage that should not be overlooked is the number of
libraries that are available to Python programmers, which may come
handy for other parts of one's application.


> Are there any other parser-generator tools I should consider? or
> should I just hand code everything?


Just about everybody around here is in a better position to answer
this question than I am.


Cheers,
Nicola Musatti



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.