text: public virtual void Execute(Lexer lexer, ICharStream input, int startIndex){bool requiresSeek = false;int stopIndex = input.Index;try{foreach (ILexerAction lexerAction in lexerActions){ILexerAction action = lexerAction;if (action is LexerIndexedCustomAction){int offset = ((LexerIndexedCustomAction)action).Offset;input.Seek(startIndex + offset);action = ((LexerIndexedCustomAction)action).Action;requiresSeek = (startIndex + offset) != stopIndex;}else{if (action.IsPositionDependent){input.Seek(stopIndex);requiresSeek = false;}}action.Execute(lexer);}}finally{if (requiresSeek){input.Seek(stopIndex);}}}