Table of Contents

Class SourceTokenSearcher

Namespace
gudusoft.gsqlparser.pp.utils
Assembly
gudusoft.gsqlparser.dll
public class SourceTokenSearcher
Inheritance
SourceTokenSearcher
Inherited Members

Methods

IndexOf(TSourceTokenList, int, int, string)

search the source token in the source token list from the top

public static int IndexOf(TSourceTokenList list, int startPos, int endPos, string text)

Parameters

list TSourceTokenList
startPos int
endPos int
text string

Returns

int

position

IndexOf(TSourceTokenList, int, int, ETokenType)

search the source token in the source token list from the top

public static int IndexOf(TSourceTokenList list, int startPos, int endPos, ETokenType type)

Parameters

list TSourceTokenList
startPos int
endPos int
type ETokenType

@return

Returns

int

IndexOf(TSourceTokenList, int, string)

search the source token in the source token list from the top

public static int IndexOf(TSourceTokenList list, int startPos, string text)

Parameters

list TSourceTokenList
startPos int
text string

@return

Returns

int

LastIndexOf(TSourceTokenList, int, int, string)

search the source token in the source token list from the end

public static int LastIndexOf(TSourceTokenList list, int startPos, int endPos, string text)

Parameters

list TSourceTokenList
startPos int
endPos int
text string

Returns

int

position

LastIndexOf(TSourceTokenList, int, string)

search the source token in the source token list from the end

public static int LastIndexOf(TSourceTokenList list, int endPos, string text)

Parameters

list TSourceTokenList
endPos int
text string

@return

Returns

int

backforwardSearch(TSourceToken, int, string)

backward search the source token

public static TSourceToken backforwardSearch(TSourceToken token, int backsearchSize, string text)

Parameters

token TSourceToken
backsearchSize int
text string

@return

Returns

TSourceToken

backforwardSearchNotWhitespaceAndReturnToken(TSourceToken, int, string)

public static TSourceToken backforwardSearchNotWhitespaceAndReturnToken(TSourceToken endToken, int backforwardSearchSize, string text)

Parameters

endToken TSourceToken
backforwardSearchSize int
text string

Returns

TSourceToken

firstNotWhitespaceAndReturnToken(TSourceTokenList, int, int)

get first token which is not whitespace and return token

public static TSourceToken firstNotWhitespaceAndReturnToken(TSourceTokenList list, int startPos, int endPos)

Parameters

list TSourceTokenList
startPos int
endPos int

@return

Returns

TSourceToken

firstSelectNotWhitespaceAndReturnToken(TSourceTokenList, int, string)

forward search the token which is the first not whitespace or return token, and its value is a fixed text

public static TSourceToken firstSelectNotWhitespaceAndReturnToken(TSourceTokenList list, int startPos, string text)

Parameters

list TSourceTokenList
startPos int
text string

@return

Returns

TSourceToken

firstSelectedToken(TSourceTokenList, int, int, string)

public static TSourceToken firstSelectedToken(TSourceTokenList list, int startPos, int endPos, string text)

Parameters

list TSourceTokenList
startPos int
endPos int
text string

Returns

TSourceToken

forwardSearch(TSourceToken, int, string)

forward search the source token

public static TSourceToken forwardSearch(TSourceToken token, int forwardSearchSize, string text)

Parameters

token TSourceToken
forwardSearchSize int
text string

@return

Returns

TSourceToken

isNewLineToken(TSourceToken)

public static bool isNewLineToken(TSourceToken token)

Parameters

token TSourceToken

Returns

bool

isSimpleComment(TSourceToken)

public static bool isSimpleComment(TSourceToken token)

Parameters

token TSourceToken

Returns

bool

lastNotWhitespaceAndReturnToken(TSourceTokenList, int)

get last token which is not whitespace and return token

public static TSourceToken lastNotWhitespaceAndReturnToken(TSourceTokenList list, int endPos)

Parameters

list TSourceTokenList
endPos int

@return

Returns

TSourceToken

lastNotWhitespaceAndReturnToken(TSourceTokenList, int, int)

get last token which is not whitespace and return token

public static TSourceToken lastNotWhitespaceAndReturnToken(TSourceTokenList list, int startPos, int endPos)

Parameters

list TSourceTokenList
startPos int
endPos int

@return

Returns

TSourceToken

lastSelectedNotWhitespaceAndReturnToken(TSourceToken, string)

backward search the token which is the first not whitespace or return token, and its value is a fixed text

public static TSourceToken lastSelectedNotWhitespaceAndReturnToken(TSourceToken token, string text)

Parameters

token TSourceToken
text string

@return

Returns

TSourceToken

lastSelectedNotWhitespaceAndReturnToken(TSourceTokenList, int, string)

backward search the token which is the first not whitespace or return token, and its value is a fixed text

public static TSourceToken lastSelectedNotWhitespaceAndReturnToken(TSourceTokenList list, int endPos, string text)

Parameters

list TSourceTokenList
endPos int
text string

Returns

TSourceToken

lastSelectedToken(TSourceTokenList, int, int, string)

public static TSourceToken lastSelectedToken(TSourceTokenList list, int startPos, int endPos, string text)

Parameters

list TSourceTokenList
startPos int
endPos int
text string

Returns

TSourceToken