Commit c4e22ba8 authored by romanb's avatar romanb

Merged tokens into lexer.

parent 5b456410
...@@ -162,27 +162,6 @@ class Lexer ...@@ -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. * Checks if an identifier is a keyword and returns its correct type.
* *
...@@ -209,7 +188,7 @@ class Lexer ...@@ -209,7 +188,7 @@ class Lexer
* *
* @param string $input a query string * @param string $input a query string
*/ */
protected function _scan($input) private function _scan($input)
{ {
static $regex; static $regex;
...@@ -240,7 +219,7 @@ class Lexer ...@@ -240,7 +219,7 @@ class Lexer
/** /**
* @todo Doc * @todo Doc
*/ */
protected function _getType(&$value) private function _getType(&$value)
{ {
// $value is referenced because it can be changed if it is numeric. // $value is referenced because it can be changed if it is numeric.
// [TODO] Revisit the _isNumeric and _getNumeric methods to reduce overhead. // [TODO] Revisit the _isNumeric and _getNumeric methods to reduce overhead.
...@@ -269,7 +248,7 @@ class Lexer ...@@ -269,7 +248,7 @@ class Lexer
/** /**
* @todo Doc * @todo Doc
*/ */
protected function _getNumeric($value) private function _getNumeric($value)
{ {
if ( ! is_scalar($value)) { if ( ! is_scalar($value)) {
return false; return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment