Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #39642
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Subject | Re: How to write a language parser ? |
| Date | 2013-02-23 02:14 +0000 |
| References | <51279cfe$0$293$14726298@news.sunsite.dk> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2323.1361585689.2939.python-list@python.org> (permalink) |
On 22/02/2013 16:29, Timothy Madden wrote: > Hello > > I am trying to write a DBGp client in python, to be used for debugging > mostly php scripts. > > Currently the XDebug module for php allows me to set breakpoints on any > line, include blank ones and lines that are not considered executable, > resulting in breakpoints that will never be hit, even if program flow > control appears to pass through the lines. > > For that I would like to write a php parser, in order to detect the > proper breakpoints line for statements spanning multiple lines. > > Is there an (open-source) way to do to this in python code ? Most > parsers I could see after a search are either too simple for a real > programming language, or based on a python module written in C. My debug > client is a Vim plugin, and I would like to distribute it as script > files only, if that is possible. The generator itself my well be a C > module, as I only distribute the generated output. > > The best parser I could find is PLY, and I would like to know if it is > good enough for the job. My attempt at a bison parser (C only) ended in > about a hundred conflicts, most of which are difficult to understand, > although I admit I do not know much about the subject yet. > > Are there other parsers you have used for complete languages ? > > Thank you, > Timothy Madden http://nedbatchelder.com/text/python-parsers.html -- Cheers. Mark Lawrence
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How to write a language parser ? Timothy Madden <terminatorul@gmail.com> - 2013-02-22 18:29 +0200 Re: How to write a language parser ? Chris Angelico <rosuav@gmail.com> - 2013-02-23 03:38 +1100 Re: How to write a language parser ? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-02-23 00:06 +0000 Re: How to write a language parser ? mbg1708@planetmail.com - 2013-02-22 17:25 -0800 Re: How to write a language parser ? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-02-23 02:14 +0000 Re: How to write a language parser ? Devin Jeanpierre <jeanpierreda@gmail.com> - 2013-02-23 05:57 -0500
csiph-web