From c4e22ba87a671c512d3f06e59b7f079dd1f652f1 Mon Sep 17 00:00:00 2001 From: romanb Date: Sat, 14 Mar 2009 10:34:40 +0000 Subject: [PATCH] Merged tokens into lexer. --- lib/Doctrine/ORM/Query/Lexer.php | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/lib/Doctrine/ORM/Query/Lexer.php b/lib/Doctrine/ORM/Query/Lexer.php index 7e015a5aa..ae9be4e08 100644 --- a/lib/Doctrine/ORM/Query/Lexer.php +++ b/lib/Doctrine/ORM/Query/Lexer.php @@ -162,27 +162,6 @@ class Lexer } } - /** - * Returns the next token in the input string. - * - * A token is an associative array containing three items: - * - 'value' : the string value of the token in the input string - * - 'type' : the type of the token (identifier, numeric, string, input - * parameter, none) - * - 'position' : the position of the token in the input string - * - * @return array|null the next token; null if there is no more tokens left - */ - /*public function next() - { - $this->_peek = 0; - if (isset($this->_tokens[$this->_position])) { - return $this->_tokens[$this->_position++]; - } else { - return null; - } - }*/ - /** * Checks if an identifier is a keyword and returns its correct type. * @@ -209,7 +188,7 @@ class Lexer * * @param string $input a query string */ - protected function _scan($input) + private function _scan($input) { static $regex; @@ -240,7 +219,7 @@ class Lexer /** * @todo Doc */ - protected function _getType(&$value) + private function _getType(&$value) { // $value is referenced because it can be changed if it is numeric. // [TODO] Revisit the _isNumeric and _getNumeric methods to reduce overhead. @@ -269,7 +248,7 @@ class Lexer /** * @todo Doc */ - protected function _getNumeric($value) + private function _getNumeric($value) { if ( ! is_scalar($value)) { return false;