Skip to content

Commit

Permalink
Ref #294 - Revert "ANSI_QUOTES lexer and parser test-suite proposal"
Browse files Browse the repository at this point in the history
This reverts commit bd519e4.
Signed-off-by: William Desportes <[email protected]>
  • Loading branch information
smarek authored and williamdes committed Mar 20, 2020
1 parent d7fa2cb commit fc3917d
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 200 deletions.
4 changes: 1 addition & 3 deletions src/Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ public static function isSymbol($str)
}
if ($str[0] === '@') {
return Token::FLAG_SYMBOL_VARIABLE;
} elseif ($str[0] === self::getIdentifierQuote()) {
} elseif ($str[0] === '`') {
return Token::FLAG_SYMBOL_BACKTICK;
} elseif ($str[0] === ':' || $str[0] === '?') {
return Token::FLAG_SYMBOL_PARAMETER;
Expand All @@ -443,8 +443,6 @@ public static function isString($str)
}
if ($str[0] === '\'') {
return Token::FLAG_STRING_SINGLE_QUOTES;
} elseif (self::hasMode(self::SQL_MODE_ANSI_QUOTES) && $str[0] === '"') {
return null;
} elseif ($str[0] === '"') {
return Token::FLAG_STRING_DOUBLE_QUOTES;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Lexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@ public function parseSymbol()
$str = null;

if ($this->last < $this->len) {
if (($str = $this->parseString(Context::getIdentifierQuote())) === null) {
if (($str = $this->parseString('`')) === null) {
if (($str = $this->parseUnknown()) === null) {
$this->error(
'Variable name was expected.',
Expand Down
3 changes: 1 addition & 2 deletions tests/Parser/ParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ public function parseProvider()
return array(
array('parser/parse'),
array('parser/parse2'),
array('parser/parseDelimiter'),
array('parser/ansi/parseAnsi')
array('parser/parseDelimiter')
);
}

Expand Down
24 changes: 0 additions & 24 deletions tests/data/lexer/ansi/lexAnsi.in

This file was deleted.

73 changes: 0 additions & 73 deletions tests/data/lexer/ansi/lexAnsi.out

This file was deleted.

24 changes: 0 additions & 24 deletions tests/data/parser/ansi/parseAnsi.in

This file was deleted.

Loading

0 comments on commit fc3917d

Please sign in to comment.