2009/3/16 Vlastimil Brom <[email protected]>: > 2009/3/16 Stef Mientki <[email protected]>: >> hello, >> >> I need to parse a nested list, given as a string, like this >> >> line = " A [ B [ C+2 ] + 3 ] " >> > ... >> >> thanks, >> Stef >> > > there is a "nestedExpr" (and probably other options, I'm not aware of ...:-) > ... > regards > vbr > Well, I thought, there was something already there in the examples for pyparsing, but couldn't find it first. check the selective pyparsing evaluator, which also supports lists:
http://pyparsing.wikispaces.com/file/view/parsePythonValue.py vbr -- http://mail.python.org/mailman/listinfo/python-list
