getActionToken(checkRule.action));
checkRule.token);
	private boolean handleRule(LineInfo info, Segment line, ParserRule checkRule)	{		if (pattern.count == 0) return true;		if (lineLength - pos < pattern.count) return true;		char a, b;		for (int k = 0; k < pattern.count; k++)		{			a = pattern.array[pattern.offset + k];			b = line.array[pos + k];			// break out and check the next rule if there is a mismatch			if (				!(					a == b ||					context.rules.getIgnoreCase() &&					(						Character.toLowerCase(a) == b ||						a == Character.toLowerCase(b)					)				)			) return true;		}		if (escaped)		{			pos += pattern.count - 1;			return false;		}		else if ((checkRule.action & IS_ESCAPE) == IS_ESCAPE)		{			escaped = true;			pos += pattern.count - 1;			return false;		}		// handle soft spans		if (context.inRule != checkRule && context.inRule != null			&& (context.inRule.action & SOFT_SPAN) != 0)		{			if ((context.inRule.action & NO_WORD_BREAK) == NO_WORD_BREAK)			{				addToken(info,pos - lastOffset, Token.INVALID);			}			else			{				addToken(info,pos - lastOffset,getActionToken(context.inRule.action));			}			lastOffset = lastKeyword = pos;			context.inRule = null;		}		if (context.inRule == null)		{			if ((checkRule.action & AT_LINE_START) == AT_LINE_START)			{				if (					(((checkRule.action & MARK_PREVIOUS) != 0) ?					lastKeyword :					pos) != line.offset				)				{					return true;				}			}			/* check to see if previous sequence is a keyword.			 * skip this if the matching rule colorizes the previous			 * sequence. */			if ((checkRule.action & MARK_PREVIOUS) != MARK_PREVIOUS)			{				markKeyword(info,line, lastKeyword, pos);				lastKeyword = pos + pattern.count;				if ((checkRule.action & WHITESPACE) == WHITESPACE)				{					return false; // break out of inner for loop to check next char				}				// mark previous sequence as NULL (plain text)				if (lastOffset < pos)				{					addToken(info,pos - lastOffset,						getActionToken(context.rules.getDefault()));				}			}			if ((checkRule.action & MAJOR_ACTIONS) == 0)			{				// this is a plain sequence rule				addToken(info,pattern.count, getActionToken(checkRule.action));				lastOffset = pos + pattern.count;			}			else if ((checkRule.action & SPAN) == SPAN)			{				context.inRule = checkRule;				if ((checkRule.action & EXCLUDE_MATCH) == EXCLUDE_MATCH)				{					addToken(info,pattern.count,						getActionToken(context.rules.getDefault()));					lastOffset = pos + pattern.count;				}				else				{					lastOffset = pos;				}				if ((checkRule.action & DELEGATE) == DELEGATE)				{					String setName = new String(checkRule.searchChars,						checkRule.sequenceLengths[0] + checkRule.sequenceLengths[1],						checkRule.sequenceLengths[2]);					ParserRuleSet delegateSet = getRuleSet(setName);					if (delegateSet != null)					{						if ((checkRule.action & EXCLUDE_MATCH) == EXCLUDE_MATCH)						{							addToken(info,pattern.count,								getActionToken(context.rules.getDefault()));						}						else						{							addToken(info,pattern.count, getActionToken(checkRule.action));						}						lastKeyword = lastOffset = pos + pattern.count;						context = new LineContext(delegateSet, context);					}				}			}			else if ((checkRule.action & EOL_SPAN) == EOL_SPAN)			{				if ((checkRule.action & EXCLUDE_MATCH) == EXCLUDE_MATCH)				{					addToken(info,pattern.count,						getActionToken(context.rules.getDefault()));					addToken(info,lineLength - (pos + pattern.count),						getActionToken(checkRule.action));				}				else				{					addToken(info,lineLength - pos,						getActionToken(checkRule.action));				}				lastOffset = lineLength;				lastKeyword = lineLength;				pos = lineLength;				return false;			}			else if ((checkRule.action & MARK_PREVIOUS) == MARK_PREVIOUS)			{				if ((checkRule.action & EXCLUDE_MATCH) == EXCLUDE_MATCH)				{					addToken(info,pos - lastOffset, getActionToken(checkRule.action));					addToken(info,pattern.count,						getActionToken(context.rules.getDefault()));				}				else				{					addToken(info,(pos + pattern.count) - lastOffset,						getActionToken(checkRule.action));				}				lastOffset = pos + pattern.count;			}			else if ((checkRule.action & MARK_FOLLOWING) == MARK_FOLLOWING)			{				context.inRule = checkRule;				if ((checkRule.action & EXCLUDE_MATCH) == EXCLUDE_MATCH)				{					addToken(info,pattern.count,						getActionToken(context.rules.getDefault()));					lastOffset = pos + pattern.count;				}				else				{					lastOffset = pos;				}			}			else			{				// UNHANDLED MAJOR ACTION!!! SHOULD NOT HAPPEN!!!			}			pos += (pattern.count - 1); // move pos to last character of match sequence			return false; // break out of inner for loop to check next char		}		else if ((checkRule.action & SPAN) == SPAN)		{			if ((checkRule.action & DELEGATE) != DELEGATE)			{				context.inRule = null;				if ((checkRule.action & EXCLUDE_MATCH) == EXCLUDE_MATCH)				{					addToken(info,pos - lastOffset, getActionToken(checkRule.action));					addToken(info,pattern.count,						getActionToken(context.rules.getDefault()));				}				else				{					addToken(info,(pos + pattern.count) - lastOffset,						getActionToken(checkRule.action));				}				lastKeyword = lastOffset = pos + pattern.count;				pos += (pattern.count - 1); // move pos to last character of match sequence			}			return false; // break out of inner for loop to check next char		}		return true;	}