CC-ing this reply to the Debian bug report.

Thanks Paul for the patch. I applied it (fixed a missing import for ungroup), used your name for the commit authorship and acknowledged
your contribution to the packaging changelog.

I will also forward the patch upstream.

Many thanks for your contribution.

Cheers,
Ghis


On 16/11/16 23:09, Paul McGuire wrote:
Ghislain –



While googling for pyparsing mentions, I found this Debian bug report:



https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=844368



I’m sorry that this recent version of pyparsing (2.1.10) causes some
compatibility problems. The change which caused you problems had to do
with the fixing of a bug in the MultipleMatch classes ZeroOrMore and
OneOrMore (although my CHANGES file only mentions ZeroOrMore).



The problem is that expressions that would return potentially multiple
words were only returning the first element when used with a results
name. This was a bug that was introduced in May, version 2.1.6 or so I
think. Apparently, you developed your grammar to work with this bug, and
expected the ‘qualifier’ result to return just a single string. After
fixing the bug, the OneOrMore expression properly returns this value as
a list, even though there is only one value.



I downloaded your module and did some quick tests, and adding the second
line below in parsing.py will fix your problem (I’m assuming that, if
multiple qualifier words are present, you will want all of them reported).



    qualifier = OneOrMore(oneOf('const unsigned typename struct enum'))

    qualifier = ungroup(qualifier.addParseAction(' '.join))



Again, I’m sorry for this mixup, I hope pyparsing continues to be useful
for you.



Regards,

-- Paul McGuire





------------------------------------------------------------------------
Avast logo <https://www.avast.com/antivirus>      

This email has been checked for viruses by Avast antivirus software.
www.avast.com <https://www.avast.com/antivirus>



Reply via email to