private string[] GetRuleTokens( string rule )
{
// breaking in tokens
string[] tokens = rule.Split( ' ' );
// looking for unary operators
for ( int i = 0; i < tokens.Length; i++ )
{
// if its unary and there is an "IS" token before, we must change positions
if ( ( unaryOperators.IndexOf( tokens[i].ToUpper( ) ) >= 0 ) &&
( i > 1 ) && ( tokens[i - 1].ToUpper( ) == "IS" ) )
{
// placing VAR name
tokens[i - 1] = tokens[i - 2];
tokens[i - 2] = tokens[i];
tokens[i] = "IS";
}
}
return tokens;
}