If you want to preserve the quotation marks, then this is just how to do it.
-----Original Message-----
From: Sebastian Wain [mailto:seb...@ne...]
Sent: Saturday, April 28, 2012 12:53 PM
To: pyp...@li...
Subject: Re: [Pyparsing] Issue with sexpparser example
Changing the line with: qString =
Group(Optional(decimal,default=None)("len") +
dblQuotedString.setParseAction(removeQuotes)).setParseAction(verifyLen)
to: qString = Group(Optional(decimal,default=None)("len") +
dblQuotedString).setParseAction(verifyLen)
Works fine. There are any other issue with this change?
Thanks,
Sebastian
-----Original Message-----
I found that parsing '(a b c)' gives the same result of parsing '(a b "c")'
and this can be problematic since c is different than "c". Is that correct?
I think the correct result will be to result in an string.
|