[Pyparsing] Re: How to use StringEnd?
Brought to you by:
ptmcg
From: <pt...@au...> - 2005-04-10 20:41:07
|
----- Original Message ----- From: Robert Pollak <rob...@gm...> Date: Sunday, April 10, 2005 2:57 pm Subject: Re: How to use StringEnd? > Being a Python newbie, I wrote: > > I tried to use > > grammar = Dict( OneOrMore( Group( assignment ) ) ) + StringEnd > > I just found out that this should be StringEnd() instead. My first > stepsin a weakly typed language :) > Now the grammar matches only when all of the input is consumed. > > -- > Robert Pollak > GPG Key ID: E66BE5B1 > Robert - Well, you solved your own problem before I could check my e-mail! So, one of the things that might help (or confuse) is that I had a built-in "empty" variable before I added the Empty class, so pyparsing now includes both an "Empty" class and an "empty" instance variable. Is this more confusing, or should I add corresponding instance built-ins for LineStart, LineEnd, StringStart and StringEnd? -- Paul |