Re: [Pyparsing] A newbie w/nested structures
Brought to you by:
ptmcg
From: Tim C. <tim...@gm...> - 2007-09-10 05:50:34
|
Paul, On Sun, 2007-09-09 at 13:29 -0500, Paul McGuire wrote: > Tim - > > Sorry, I must have mis-pasted the sample, here it is again. It parses okay > on my system (and I tested versions back to 1.4.2). I'm using 1.4.7 on Linux. The problem was actually that there are newlines embedded in the sample text and quotedString doesn't allow that. I defined quotedText = QuotedString('"',multiline=True) and replaced the quotedString in the valueDef definition with quotedText. It works now. > Your description of key and valueDef are completely correct. Great! Maybe I'm getting somewhere. :-) > If you want > another example of Forward, I just posted this on comp.lang.python - > http://groups.google.com/group/comp.lang.python/browse_frm/thread/4f128e9df5 > 4d6962/# - it is a basic nested example with words enclosed in nested > braces. Thanks for another great example. Cheers, Tim |