On Sat, Feb 23, 2013 at 3:29 AM, Timothy Madden <terminato...@gmail.com> 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.net/manual/en/function.token-get-all.php It's supposed to be able to tell you line numbers, too, though I haven't actually used that. In theory, you should be able to use token_get_all, then JSON encode it, and write the whole lot out to stdout, where Python can pick it up and work with it. ChrisA -- http://mail.python.org/mailman/listinfo/python-list