Re: How to write a language parser ?

2013-02-23 Thread Devin Jeanpierre
On Fri, Feb 22, 2013 at 9:14 PM, Mark Lawrence wrote: > http://nedbatchelder.com/text/python-parsers.html Hm, that list is missing information. e.g. ANTLR 4 doesn't support python, and LEPL is dead now. -- Devin -- http://mail.python.org/mailman/listinfo/python-list

Re: How to write a language parser ?

2013-02-22 Thread Mark Lawrence
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

Re: How to write a language parser ?

2013-02-22 Thread mbg1708
On Friday, February 22, 2013 11:29:42 AM UTC-5, 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

Re: How to write a language parser ?

2013-02-22 Thread Steven D'Aprano
On Fri, 22 Feb 2013 18:29:42 +0200, Timothy Madden wrote: [...] > 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 ? Try pyparsing: http://pyparsi

Re: How to write a language parser ?

2013-02-22 Thread Chris Angelico
On Sat, Feb 23, 2013 at 3:29 AM, Timothy Madden wrote: > For that I would like to write a php parser, in order to detect the proper > breakpoints line for statements spanning multiple lines. Are you able to drop to PHP itself for that? It makes its own lexer available to user-code: http://php.ne

How to write a language parser ?

2013-02-22 Thread Timothy Madden
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, eve