pyparsing listAllMatches problem
Paul McGuire
ptmcg at austin.rr._bogus_.com
Sat Sep 9 13:46:29 EDT 2006
"don pasquale" <don.pasquale at blabla_tzimeil.com> wrote in message
news:op.tfl7fdwumlmssi at fafoi.lan...
> hello,
> I'm using pyparsing and trying to parse something like:
> test="""Q(x,y,z):-Bloo(x,"Mitsis",y),Foo(y,z,1243),y>28,x<12,x>3"""
>
> and also have all comparison predicates in a separate list apart from the
> parse tree. So my grammar has this line in it:
>
> Comparison_Predicate = Group(variable + oneOf("< >") +
> integer).setResultsName("pred",listAllMatches=True)
>
> but it doesn't work at all... only the last comp.pred. gets in the pred
> attribute...
Thanks for posting this test case. This is a bug in pyparsing. I'll have a
fix ready shortly.
-- Paul
More information about the Python-list
mailing list