re module - error with non-greedy matches

Paul Wright -$Paul$- at verence.demon.co.uk
Wed Jan 9 09:15:57 EST 2002


In article <3C3C4FFA.1040104 at dstc.qut.edu.au>,
Derek Thomson  <derekt at dstc.qut.edu.au> wrote:
>I'm having some trouble porting a Perl program to Python. It extracts C 
>functions from the source and performs some analysis.

This is peripherally related to your question, but: when I'm doing
analysis of C, I usually connect Python to Exuberent Ctags
<http://ctags.sf.net/> via a pipe, rather than trying to parse C with
regexps. (Actually, I usually get ctags to do the hard stuff and then do
the easy stuff in Python with regexps). I'd recommend this method as a
workaround.  ctags -x is a useful option, as it produces nicely
delimited output.

-- 
Paul Wright | http://pobox.com/~pw201 |



More information about the Python-list mailing list