Re: pyparsing Combine without merging sub-expressions

2007-01-21 Thread Steven Bethard
Paul McGuire wrote: > Steven Bethard wrote: >> Within a larger pyparsing grammar, I have something that looks like:: >> >> wsj/00/wsj_0003.mrg >> >> When parsing this, I'd like to keep around both the full string, and the >> AAA_ substring of it, so I'd like something like:: >> >> >>>

Re: pyparsing Combine without merging sub-expressions

2007-01-21 Thread Steven Bethard
Dennis Lee Bieber wrote: > On Sat, 20 Jan 2007 13:49:52 -0700, Steven Bethard > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > >> Within a larger pyparsing grammar, I have something that looks like:: >> >> wsj/00/wsj_0003.mrg >> >> When parsing this, I'd like to keep aroun

Re: pyparsing Combine without merging sub-expressions

2007-01-21 Thread Paul McGuire
Steven Bethard wrote: > Within a larger pyparsing grammar, I have something that looks like:: > > wsj/00/wsj_0003.mrg > > When parsing this, I'd like to keep around both the full string, and the > AAA_ substring of it, so I'd like something like:: > > >>> foo.parseString('wsj/00/wsj_

pyparsing Combine without merging sub-expressions

2007-01-20 Thread Steven Bethard
Within a larger pyparsing grammar, I have something that looks like:: wsj/00/wsj_0003.mrg When parsing this, I'd like to keep around both the full string, and the AAA_ substring of it, so I'd like something like:: >>> foo.parseString('wsj/00/wsj_0003.mrg') (['wsj/00/wsj_0003.