SimpleArithmeticExpression() public method

SimpleArithmeticExpression ::= ArithmeticTerm {("+" | "-") ArithmeticTerm}*
public SimpleArithmeticExpression ( ) : Doctrine\ORM\Query\AST\SimpleArithmeticExpression
return Doctrine\ORM\Query\AST\SimpleArithmeticExpression
 /**
  * @override
  */
 public function parse(\Doctrine\ORM\Query\Parser $parser)
 {
     $parser->match(Lexer::T_IDENTIFIER);
     $parser->match(Lexer::T_OPEN_PARENTHESIS);
     $this->firstSimpleArithmeticExpression = $parser->SimpleArithmeticExpression();
     $parser->match(Lexer::T_COMMA);
     $this->secondSimpleArithmeticExpression = $parser->SimpleArithmeticExpression();
     $parser->match(Lexer::T_CLOSE_PARENTHESIS);
 }
Example #2
0
 public function parse(\Doctrine\ORM\Query\Parser $parser)
 {
     $parser->match(Lexer::T_IDENTIFIER);
     $parser->match(Lexer::T_OPEN_PARENTHESIS);
     $this->arithmeticExpression = $parser->SimpleArithmeticExpression();
     try {
         $parser->match(Lexer::T_COMMA);
         $this->optionalSecondExpression = $parser->SimpleArithmeticExpression();
         $parser->match(Lexer::T_CLOSE_PARENTHESIS);
     } catch (QueryException $e) {
         $parser->match(Lexer::T_CLOSE_PARENTHESIS);
     }
 }
Example #3
0
 /**
  * @override
  */
 public function parse(\Doctrine\ORM\Query\Parser $parser)
 {
     $parser->match(Lexer::T_IDENTIFIER);
     $parser->match(Lexer::T_OPEN_PARENTHESIS);
     $this->stringPrimary = $parser->StringPrimary();
     $parser->match(Lexer::T_COMMA);
     $this->firstSimpleArithmeticExpression = $parser->SimpleArithmeticExpression();
     $lexer = $parser->getLexer();
     if ($lexer->isNextToken(Lexer::T_COMMA)) {
         $parser->match(Lexer::T_COMMA);
         $this->secondSimpleArithmeticExpression = $parser->SimpleArithmeticExpression();
     }
     $parser->match(Lexer::T_CLOSE_PARENTHESIS);
 }
Example #4
0
 /**
  * Parse
  *
  * @param \Doctrine\ORM\Query\Parser $parser
  */
 public function parse(Parser $parser)
 {
     $parser->match(Lexer::T_IDENTIFIER);
     $parser->match(Lexer::T_OPEN_PARENTHESIS);
     $this->arithmeticExpression = $parser->SimpleArithmeticExpression();
     $parser->match(Lexer::T_CLOSE_PARENTHESIS);
 }
Example #5
0
 /**
  * {@inheritdoc}
  */
 public function parse(Parser $parser)
 {
     $parser->match(Lexer::T_IDENTIFIER);
     $parser->match(Lexer::T_OPEN_PARENTHESIS);
     $this->parameters[self::PARAMETER_KEY] = $parser->SimpleArithmeticExpression();
     $parser->match(Lexer::T_CLOSE_PARENTHESIS);
 }
Example #6
0
 public function parse(\Doctrine\ORM\Query\Parser $parser)
 {
     $lexer = $parser->getLexer();
     $parser->match(Lexer::T_IDENTIFIER);
     $parser->match(Lexer::T_OPEN_PARENTHESIS);
     $this->arithmeticExpression = $parser->SimpleArithmeticExpression();
     $parser->match(Lexer::T_CLOSE_PARENTHESIS);
 }
Example #7
0
 public function parse(Parser $parser)
 {
     $parser->match(Lexer::T_IDENTIFIER);
     // (2)
     $parser->match(Lexer::T_OPEN_PARENTHESIS);
     // (3)
     $this->f1 = $parser->SimpleConditionalExpression();
     // (4)
     $parser->match(Lexer::T_COMMA);
     // (5)
     $this->f2 = $parser->SimpleArithmeticExpression();
     // (6)
     $parser->match(Lexer::T_COMMA);
     // (5)
     $this->f3 = $parser->SimpleArithmeticExpression();
     // (6)
     $parser->match(Lexer::T_CLOSE_PARENTHESIS);
     // (3)
 }
 /**
  * @param \Doctrine\ORM\Query\Parser $parser
  */
 public function parse(\Doctrine\ORM\Query\Parser $parser)
 {
     $parser->match(Lexer::T_IDENTIFIER);
     $parser->match(Lexer::T_OPEN_PARENTHESIS);
     $this->value = $parser->ArithmeticPrimary();
     $parser->match(Lexer::T_COMMA);
     $this->delimiter = $parser->StringExpression();
     $parser->match(Lexer::T_COMMA);
     $this->count = $parser->SimpleArithmeticExpression();
     $parser->match(Lexer::T_CLOSE_PARENTHESIS);
 }
Example #9
0
 /**
  * parse
  *
  * @param \Doctrine\ORM\Query\Parser $parser
  * @access public
  * @return void
  */
 public function parse(\Doctrine\ORM\Query\Parser $parser)
 {
     $parser->match(Lexer::T_IDENTIFIER);
     $parser->match(Lexer::T_OPEN_PARENTHESIS);
     $this->simpleArithmeticExpression = $parser->SimpleArithmeticExpression();
     $parser->match(Lexer::T_COMMA);
     $this->roundPrecission = $parser->ArithmeticExpression();
     if ($this->roundPrecission == null) {
         $this->roundPrecission = 0;
     }
     $parser->match(Lexer::T_CLOSE_PARENTHESIS);
 }
Example #10
0
 public function parse(\Doctrine\ORM\Query\Parser $parser)
 {
     $lexer = $parser->getLexer();
     $parser->match(Lexer::T_IDENTIFIER);
     $parser->match(Lexer::T_OPEN_PARENTHESIS);
     $this->firstExpression = $parser->SimpleArithmeticExpression();
     // parse second parameter if available
     if (Lexer::T_COMMA === $lexer->lookahead['type']) {
         $parser->match(Lexer::T_COMMA);
         $this->secondExpression = $parser->ArithmeticPrimary();
     }
     $parser->match(Lexer::T_CLOSE_PARENTHESIS);
 }