Re: Understanding whitespace

[email protected] (Colin Kuskie) Mon, 10 Nov 2003 14:10:05 -0800
Newsgroups perl.recdescent
Message-ID <[email protected]>
On Mon, Nov 10, 2003 at 10:22:27AM -0800, Collin Peters wrote:
> I have a piece of text that I am parsing that looks like this:
> c: winsize0 is {"1919","1925","1936"}
> 
> The above rule matches fine with the rule IFSTATEMENT:
> VARIABLE 	: /\w[a-z0-9-\/]*/i 	
> DOMAIN_COMP	: /is\s+[not]*/ix
> DOMAIN	 	: VALUES(s)  # {"vsk", "vr", ...}
> IFSTATEMENT	: VARIABLE DOMAIN_COMP '{' DOMAIN '}'
> 
> My question is how to continue to get a match with:
> c: winsize0 is{"1919","1925","1936"}
> 
> Notice the missing space between the is and the '{'

If your character class, [not], is really supposed to be
parentheses, then this should work:

DOMAIN_COMP	: /(?:is not)|(?:is)\s*/ix

Colin