LineInfo prev; if(start == -1) prev = null; else prev = lineInfo[start];   Element map = buffer.getDefaultRootElement();  for(int i = start + 1; i <= lineIndex; i++)
context = info.context;  context.parent = (lastContext.parent == null ? null : (LineContext)lastContext.parent.clone()); context.inRule = lastContext.inRule; context.rules = lastContext.rules;  lastOffset = lastKeyword = line.offset; lineLength = line.count + line.offset;  int terminateChar = context.rules.getTerminateChar(); int searchLimit = (terminateChar >= 0 && terminateChar < line.count) ? line.offset + terminateChar : lineLength;  escaped = false;  boolean b; boolean tempEscaped; Segment tempPattern; ParserRule rule; LineContext tempContext;  for(pos = line.offset; pos < searchLimit; pos++)
	public LineInfo markTokens(Buffer buffer, int lineIndex)	{		LineInfo info = lineInfo[lineIndex];		/* If cached tokens are valid, return 'em */		if(info.tokensValid)			return info;		//long _start = System.currentTimeMillis();		/*		 * Else, go up to 100 lines back, looking for a line with		 * cached tokens. Tokenize from that line to this line.		 */		int start = Math.max(0,lineIndex - 100) - 1;		int end = Math.max(0,lineIndex - 100);		for(int i = lineIndex - 1; i > end; i--)		{			if(lineInfo[i].tokensValid)			{				start = i;				break;			}		}		LineInfo prev;		if(start == -1)			prev = null;		else			prev = lineInfo[start];		//System.err.println("i=" + lineIndex + ",start=" + start);		Element map = buffer.getDefaultRootElement();		for(int i = start + 1; i <= lineIndex; i++)		{			info = lineInfo[i];			if(info.tokensValid)			{				prev = info;				continue;			}			Element lineElement = map.getElement(i);			int lineStart = lineElement.getStartOffset();			try			{				buffer.getText(lineStart,lineElement.getEndOffset()					- lineStart - 1,line);			}			catch(BadLocationException e)			{				Log.log(Log.ERROR,this,e);			}			/* Prepare for tokenization */			info.lastToken = null;			ParserRule oldRule = info.context.inRule;			LineContext oldParent = info.context.parent;			markTokensImpl(prev,info);			ParserRule newRule = info.context.inRule;			LineContext newParent = info.context.parent;			info.tokensValid = true;			if(i != lastTokenizedLine)			{				nextLineRequested = false;				lastTokenizedLine = i;			}			nextLineRequested |= (oldRule != newRule || oldParent != newParent);			addToken(info,0,Token.END);			prev = info;		}		if(nextLineRequested && length - lineIndex > 1)		{			linesChanged(lineIndex + 1,length - lineIndex - 1);		}		//System.err.println(System.currentTimeMillis() - _start);		return info;	}