[Pyparsing] Why are ignore settings not applied in Combine statement ?
Brought to you by:
ptmcg
From: Samuel L. <sa...@ho...> - 2008-01-16 13:35:07
|
Hi, I have problems with setting ignores for a grammar. The following is a very simplified program to explain my problem. First I had a simple program like a) a) from pyparsing import Literal grammar =3D Literal("A") + Literal("B") + Literal("C") grammar.ignore(",") grammar.parseString("A,,,,,B,,C") It just worked perfectly. Commas where simply ignored (as defined) Later on I adapted my program to use the Combine command, which in my under= standing should just have an effect on how the parser results are represent= ed... b) from pyparsing import Literal, Combine grammar =3D Combine(Literal("A") + Literal("B") + Literal("C")) grammar.ignore(",") grammar.parseString("A,,,,,B,,C") ...but I suddently got a ParseException: pyparsing.ParseException: Expected "B" (at char 1), (line:1, col:2) It seems that the commas are not anymore ignored in the Combine statement! Can anyone tell me why, or how to have the parser apply ignore rules also i= n the Combine command ? Sam _________________________________________________________________ Jetzt 30 Gratis-Emoticons f=FCr Windows Live Messenger downloaden! http://www.livemessenger-emoticons.com/de-at= |