diff options
author | Dan Ungureanu <udan1107@gmail.com> | 2015-07-11 18:03:09 +0300 |
---|---|---|
committer | Dan Ungureanu <udan1107@gmail.com> | 2015-07-11 18:03:09 +0300 |
commit | 08ad4807b1797459aec8de364d1fb11686d194ca (patch) | |
tree | 095753aa6ca1a9d18b85f0fb03b7eba326ee31a7 /src | |
parent | 9eceeec8c51eb872b7e865ced3bad544571af1f3 (diff) | |
download | sql-parser-08ad4807b1797459aec8de364d1fb11686d194ca.zip sql-parser-08ad4807b1797459aec8de364d1fb11686d194ca.tar.gz sql-parser-08ad4807b1797459aec8de364d1fb11686d194ca.tar.bz2 |
Added default delimiter that is used for all new Lexer instances.
Diffstat (limited to 'src')
-rw-r--r-- | src/Lexer.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Lexer.php b/src/Lexer.php index d091221..d70641f 100644 --- a/src/Lexer.php +++ b/src/Lexer.php @@ -103,7 +103,15 @@ class Lexer public $list; /** + * The default delimiter. This is used, by default, in all new instances. + * + * @var string + */ + public static $DEFAULT_DELIMITER = ';'; + + /** * Statements delimiter. + * This may change during lexing. * * @var string */ @@ -145,6 +153,9 @@ class Lexer $this->len = ($str instanceof UtfString) ? $str->length() : strlen($str); $this->strict = $strict; + + $this->delimiter = static::$DEFAULT_DELIMITER; + $this->lex(); } |