is there an easy way to parse a nested list ?
vlastimil.brom at gmail.com
Mon Mar 16 10:29:57 CET 2009
2009/3/16 Vlastimil Brom <vlastimil.brom at gmail.com>:
> 2009/3/16 Stef Mientki <stef.mientki at gmail.com>:
>> I need to parse a nested list, given as a string, like this
>> line = " A [ B [ C+2 ] + 3 ] "
> there is a "nestedExpr" (and probably other options, I'm not aware of ...:-)
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:
More information about the Python-list