1
0
mirror of synced 2024-12-13 06:46:03 +03:00

Merged tokens into lexer.

This commit is contained in:
romanb 2009-03-14 10:34:40 +00:00
parent 5b4564109e
commit c4e22ba87a

View File

@ -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;