Re: a little parsing challenge ☺

rantingrick rantingrick at
Sun Jul 17 21:52:12 EDT 2011

On Jul 17, 2:47 am, Xah Lee <xah... at> wrote:
> 2011-07-16
> folks, this one will be interesting one.
> the problem is to write a script that can check a dir of text files
> (and all subdirs) and reports if a file has any mismatched matching
> brackets.
> • You script must be standalone. Must not be using some parser tools.
> But can call lib that's part of standard distribution in your lang.

I stopped reading here and did...

>>> from HyperParser import HyperParser # python2.x

...and called it a day. ;-) This module is part of the stdlib (idlelib
\HyperParser) so as per your statement it is legal (may not be the
fastest solution).

More information about the Python-list mailing list