is there an easy way to parse a nested list ?
vlastimil.brom at gmail.com
Mon Mar 16 09:05:56 CET 2009
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 ] "
I guess, you can use e.g. pyparsing;
there is a "nestedExpr" (and probably other options, I'm not aware of ...:-)
Check the example
or othere to see, if you can adapt it for your needs.
More information about the Python-list