Skip to content

Commit fc3917d

Browse files
smarekwilliamdes
authored andcommitted
Ref #294 - Revert "ANSI_QUOTES lexer and parser test-suite proposal"
This reverts commit bd519e4. Signed-off-by: William Desportes <[email protected]>
1 parent d7fa2cb commit fc3917d

File tree

7 files changed

+3
-200
lines changed

7 files changed

+3
-200
lines changed

src/Context.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ public static function isSymbol($str)
417417
}
418418
if ($str[0] === '@') {
419419
return Token::FLAG_SYMBOL_VARIABLE;
420-
} elseif ($str[0] === self::getIdentifierQuote()) {
420+
} elseif ($str[0] === '`') {
421421
return Token::FLAG_SYMBOL_BACKTICK;
422422
} elseif ($str[0] === ':' || $str[0] === '?') {
423423
return Token::FLAG_SYMBOL_PARAMETER;
@@ -443,8 +443,6 @@ public static function isString($str)
443443
}
444444
if ($str[0] === '\'') {
445445
return Token::FLAG_STRING_SINGLE_QUOTES;
446-
} elseif (self::hasMode(self::SQL_MODE_ANSI_QUOTES) && $str[0] === '"') {
447-
return null;
448446
} elseif ($str[0] === '"') {
449447
return Token::FLAG_STRING_DOUBLE_QUOTES;
450448
}

src/Lexer.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -935,7 +935,7 @@ public function parseSymbol()
935935
$str = null;
936936

937937
if ($this->last < $this->len) {
938-
if (($str = $this->parseString(Context::getIdentifierQuote())) === null) {
938+
if (($str = $this->parseString('`')) === null) {
939939
if (($str = $this->parseUnknown()) === null) {
940940
$this->error(
941941
'Variable name was expected.',

tests/Parser/ParserTest.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ public function parseProvider()
2525
return array(
2626
array('parser/parse'),
2727
array('parser/parse2'),
28-
array('parser/parseDelimiter'),
29-
array('parser/ansi/parseAnsi')
28+
array('parser/parseDelimiter')
3029
);
3130
}
3231

tests/data/lexer/ansi/lexAnsi.in

-24
This file was deleted.

tests/data/lexer/ansi/lexAnsi.out

-73
This file was deleted.

tests/data/parser/ansi/parseAnsi.in

-24
This file was deleted.

0 commit comments

Comments
 (0)