In a message dated Sun, 9 Jun 2002, Damian Conway writes: > Trey Harris wrote: > > rule parsetag :w { > > <lt> $tagname := <identifier> > > %attrs := [ (<identifier>) = > > (<val>) > > ]* > > /? > > <gt> > > }
On second reading, it occurs to me that this wouldn't work quite right, because the :w would imply a \s+ between <lt> and <identifier>, between the equals, and before the <gt>. Does an explicit space assertion in :w automatically suppress the implicit ones on either side? I.e., would rule parsetag :w { <lt> \s* $tagname := <identifier> %attrs := [ (<identifier>) = <val> ]* \s* /? <gt> } Work? Or would I have to be explicit about everything: rule parsetag { <lt> \s* $tagname := <identifier> \s+ %attrs := [ (<identifier>) \s* = \s* (<val>) \s* ]* \s* /? <gt> } It strikes me that this is a problem crying out for a DWIMmy solution--something that could deal with whitespace in a common way, i.e., required between tokens that can't otherwise be differentiated.... am I missing something? Trey