프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$DEFAULT_DELIMITER | string | The default delimiter. This is used, by default, in all new instances. | |
$PARSER_METHODS | array | A list of methods that are used in lexing the SQL query. | |
$delimiter | string | This may change during lexing. | |
$delimiterLen | integer | Because parseDelimiter can be called a lot, it would perform a lot of calls to strlen, which might affect performance when the delimiter is big. | |
$errors | Usually, the lexing does not stop once an error occurred because that error might be false positive or a partial result (even a bad one) might be needed. | ||
$last | integer | The index of the last parsed character. | |
$len | integer | By storing its length, a lot of time is saved, because parsing methods would call strlen everytime. | |
$list | Tokens extracted from given strings. | ||
$str | string | |
The string to be parsed. | |
$strict | boolean | Whether errors should throw exceptions or just be stored. |
메소드 | 설명 | |
---|---|---|
__construct ( string | |
Constructor. | |
error ( string $msg = '', string $str = '', integer $pos, integer $code ) : void | Creates a new error log. | |
getTokens ( string | |
Gets the tokens list parsed by a new instance of a lexer. | |
lex ( ) : void | Parses the string and extracts lexemes. | |
parseBool ( ) : |
Parses a boolean. | |
parseComment ( ) : |
Parses a comment. | |
parseDelimiter ( ) : |
Parses the delimiter of the query. | |
parseKeyword ( ) : |
Parses a keyword. | |
parseLabel ( ) : |
Parses a label. | |
parseNumber ( ) : |
Parses a number. | |
parseOperator ( ) : |
Parses an operator. | |
parseString ( string $quote = '' ) : |
Parses a string. | |
parseSymbol ( ) : |
Parses a symbol. | |
parseUnknown ( ) : |
Parses unknown parts of the query. | |
parseWhitespace ( ) : |
Parses a whitespace. | |
setDelimiter ( string $delimiter ) | Sets the delimiter. |
public parseDelimiter ( ) : |
||
리턴 |
public parseString ( string $quote = '' ) : |
||
$quote | string | Additional starting symbol. |
리턴 |
public setDelimiter ( string $delimiter ) | ||
$delimiter | string | The new delimiter. |
public static string $DEFAULT_DELIMITER | ||
리턴 | string |
public static array $PARSER_METHODS | ||
리턴 | array |
public int $delimiterLen | ||
리턴 | integer |
public LexerException[],SqlParser\Exceptions $errors | ||
리턴 |
public int $len | ||
리턴 | integer |
public TokensList,sqlparser $list | ||
리턴 |
public string|UtfString,sqlparser $str | ||
리턴 | string | |
public bool $strict | ||
리턴 | boolean |