C parsing fun

Roberto Bonvallet rbonvall at alumnos.inf.utfsm.cl
Thu Feb 8 12:00:45 EST 2007


Károly Kiripolszky <karoly.kiripolszky at gmail.com> wrote:
> I've found a brute-force solution. In the preprocessing phase I simply
> strip out the comments (things inside comments won't appear in the
> result) and replace curly brackets with these symbols: #::OPEN::# and
> #::CLOSE::#.

This fails when the code already has the strings "#::OPEN::#" and
"#::CLOSE::" in it.

-- 
Roberto Bonvallet



More information about the Python-list mailing list