It should be possible to get any string as the parsed value of QuotedString. In pyparsing 1.5.7 it is not possible to get, as parsed value, the string
is the escape character and
'"' is the quoting character.
More concretely, I would expect the following to print
\". However, it prints
\\":from pyparsing import QuotedString quotedString = QuotedString(quoteChar='"', escChar='\\') print quotedString.parseString(r'"\\\""')
To fix this, QuotedString should unescape the substring of twice the escaping character.