@@ -255,8 +255,8 @@ public function lex()
255255 && ($ token ->type === Token::TYPE_SYMBOL )
256256 && ($ token ->flags & Token::FLAG_SYMBOL_VARIABLE )
257257 && (($ lastToken ->type === Token::TYPE_STRING )
258- || (($ lastToken ->type === Token::TYPE_SYMBOL )
259- && ($ lastToken ->flags & Token::FLAG_SYMBOL_BACKTICK )))
258+ || (($ lastToken ->type === Token::TYPE_SYMBOL )
259+ && ($ lastToken ->flags & Token::FLAG_SYMBOL_BACKTICK )))
260260 ) {
261261 // Handles ```... FROM 'user'@'%' ...```.
262262 $ lastToken ->token .= $ token ->token ;
@@ -266,7 +266,6 @@ public function lex()
266266 continue ;
267267 } elseif (($ lastToken !== null )
268268 && ($ token ->type === Token::TYPE_KEYWORD )
269- && ($ token ->flags & Token::FLAG_KEYWORD_RESERVED )
270269 && ($ lastToken ->type === Token::TYPE_OPERATOR )
271270 && ($ lastToken ->value === '. ' )
272271 ) {
@@ -316,6 +315,16 @@ public function lex()
316315 while ((++$ this ->last < $ this ->len ) && (!Context::isWhitespace ($ this ->str [$ this ->last ]))) {
317316 $ this ->delimiter .= $ this ->str [$ this ->last ];
318317 }
318+
319+ if (empty ($ this ->delimiter )) {
320+ $ this ->error (
321+ __ ('Expected delimiter. ' ),
322+ '' ,
323+ $ this ->last
324+ );
325+ $ this ->delimiter = '; ' ;
326+ }
327+
319328 --$ this ->last ;
320329
321330 // Saving the delimiter and its token.
@@ -608,7 +617,7 @@ public function parseNumber()
608617 } elseif (($ this ->last + 1 < $ this ->len )
609618 && ($ this ->str [$ this ->last ] === '0 ' )
610619 && (($ this ->str [$ this ->last + 1 ] === 'x ' )
611- || ($ this ->str [$ this ->last + 1 ] === 'X ' ))
620+ || ($ this ->str [$ this ->last + 1 ] === 'X ' ))
612621 ) {
613622 $ token .= $ this ->str [$ this ->last ++];
614623 $ state = 2 ;
0 commit comments