Hi,
I'm new, but I'm already enjoying the power of PyParsing. I'm successfully parsing C-like structures, but my little brain seems stuck on what is the right way to parse a "nested structure", meaning a C-struct inside of another C-struct.
There are many great examples, but I still don't understand what is making nested parsing work for others. I keep getting "expected }" errors.
Of course, I would like the result of parsing to produce a hierarchical structure like the text structure represents. This will help me to reproduce the file that was parsed. My goal is to read files with these structures, add a little more content, then write a new version of the file. I believe I will achieve this using "Group(stuff)".
Hi,
I'm new, but I'm already enjoying the power of PyParsing. I'm successfully parsing C-like structures, but my little brain seems stuck on what is the right way to parse a "nested structure", meaning a C-struct inside of another C-struct.
There are many great examples, but I still don't understand what is making nested parsing work for others. I keep getting "expected }" errors.
Of course, I would like the result of parsing to produce a hierarchical structure like the text structure represents. This will help me to reproduce the file that was parsed. My goal is to read files with these structures, add a little more content, then write a new version of the file. I believe I will achieve this using "Group(stuff)".
I've had some help on StackExchange, but it is still not working yet. Will you please see my problem description there? Thank you!
http://stackoverflow.com/questions/23841136/the-trick-to-nested-structures-in-pyparsing