/**
  * @override
  */
 public function parse(\Doctrine\ORM\Query\Parser $parser)
 {
     $lexer = $parser->getLexer();
     $parser->match($lexer->lookahead['value']);
     $parser->match('(');
     $this->_firstStringPrimary = $parser->_StringPrimary();
     $parser->match(',');
     $this->_secondStringPrimary = $parser->_StringPrimary();
     $parser->match(')');
 }
 /**
  * @override
  */
 public function parse(\Doctrine\ORM\Query\Parser $parser)
 {
     $lexer = $parser->getLexer();
     $parser->match($lexer->lookahead['value']);
     $parser->match('(');
     $this->_firstStringPrimary = $parser->_StringPrimary();
     $parser->match(',');
     $this->_secondStringPrimary = $parser->_StringPrimary();
     if ($lexer->isNextToken(',')) {
         $parser->match(',');
         $this->_simpleArithmeticExpression = $parser->_SimpleArithmeticExpression();
     }
     $parser->match(')');
 }
Exemple #3
0
 /**
  * @override
  */
 public function parse(\Doctrine\ORM\Query\Parser $parser)
 {
     $lexer = $parser->getLexer();
     $parser->match($lexer->lookahead['value']);
     $parser->match('(');
     if (strcasecmp('leading', $lexer->lookahead['value']) === 0) {
         $parser->match($lexer->lookahead['value']);
         $this->_leading = true;
     } else {
         if (strcasecmp('trailing', $lexer->lookahead['value']) === 0) {
             $parser->match($lexer->lookahead['value']);
             $this->_trailing = true;
         } else {
             if (strcasecmp('both', $lexer->lookahead['value']) === 0) {
                 $parser->match($lexer->lookahead['value']);
                 $this->_both = true;
             }
         }
     }
     if ($lexer->isNextToken(Lexer::T_STRING)) {
         $parser->match(Lexer::T_STRING);
         $this->_trimChar = $lexer->token['value'];
     }
     if ($this->_leading || $this->_trailing || $this->_both || $this->_trimChar) {
         $parser->match(Lexer::T_FROM);
     }
     $this->_stringPrimary = $parser->_StringPrimary();
     $parser->match(')');
 }