public function ComparisonOperator()
{
switch ($this->_lexer->lookahead['value']) {
case '=':
$this->match(Lexer::T_EQUALS);
return '=';
case '<':
$this->match(Lexer::T_LOWER_THAN);
$operator = '<';
if ($this->_lexer->isNextToken(Lexer::T_EQUALS)) {
$this->match(Lexer::T_EQUALS);
$operator .= '=';
} else if ($this->_lexer->isNextToken(Lexer::T_GREATER_THAN)) {
$this->match(Lexer::T_GREATER_THAN);
$operator .= '>';
}
return $operator;
case '>':
$this->match(Lexer::T_GREATER_THAN);
$operator = '>';
if ($this->_lexer->isNextToken(Lexer::T_EQUALS)) {
$this->match(Lexer::T_EQUALS);
$operator .= '=';
}
return $operator;
case '!':
$this->match(Lexer::T_NEGATE);
$this->match(Lexer::T_EQUALS);
return '<>';
default:
$this->syntaxError('=, <, <=, <>, >, >=, !=');
}
}