Parser
FinalYes
An LL(*) recursive-descent parser for MySQL CREATE TABLE statements.
Parses a CREATE TABLE statement, reports any errors in it, and generates an AST.
Table of Contents
Methods
- __construct() : mixed
- getAST() : AbstractCreateStatement
- Parses and builds AST for the given Query.
- parse() : array<int, Table>
- Parses a statement string.
Methods
__construct()
public
__construct(Lexer $lexer) : mixed
Parameters
- $lexer : Lexer
getAST()
Parses and builds AST for the given Query.
public
getAST(string $statement) : AbstractCreateStatement
Only public for testing, the core API method is parse().
Parameters
- $statement : string
Tags
Return values
AbstractCreateStatementparse()
Parses a statement string.
public
parse(string $statement) : array<int, Table>
Parameters
- $statement : string