2009/3/22 Aaron Brady <castiro...@gmail.com>:
> Hi,
>
> Every so often the group gets a request for parsing an expression.  I
> think it would be significantly easier to do if regular expressions
> could modify a stack.  However, since you might nearly as well write
> Python, maybe there is a compromise.

If you need to parse something of decent complexity, you ought to use
a actual proper parser generator, e.g. PLY, pyparsing, ANTLR, etc.
Abusing regular expressions like that to kludge jury-rigged parsers
together can only lead to pain when special cases and additional
grammar complexity emerge and start breaking the parser in difficult
ways. I'm not seeing the use case for your suggestion.

Cheers,
Chris

-- 
I have a blog:
http://blog.rebertia.com
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to