Parser
class Parser (View source)
Defines the parser of the library.
This is one of the most important components, along with the lexer.
Takes multiple tokens (contained in a Lexer instance) as input and builds a parse tree.
Constants
STATEMENT_PARSERS |
Array of classes that are used in parsing the SQL statements. |
KEYWORD_PARSERS |
Array of classes that are used in parsing SQL components. |
Properties
Exception[] | $errors | List of errors that occurred during lexing. |
|
TokensList|null | $list | The list of tokens that are parsed. |
|
Statement[] | $statements | List of statements parsed. |
|
int | $brackets | The number of opened brackets. |
Methods
__construct(TokensList|null $list = null, bool $strict = false)
No description
void
parse()
Builds the parse trees.
void
error(string $msg, Token|null $token = null, int $code = 0)
Creates a new error log.
Details
__construct(TokensList|null $list = null, bool $strict = false)
No description
void
parse()
Builds the parse trees.
void
error(string $msg, Token|null $token = null, int $code = 0)
Creates a new error log.