AST __t98 = _t;
op1 = _t==ASTNULL ? null :(JQLAST)_t;
match(_t,PLUS);
_t = _t.getFirstChild();
left1 = (JQLAST)_t;
if ( _t==null ) throw new MismatchedTokenException();
_t = _t.getNextSibling();
right1 = (JQLAST)_t;
if ( _t==null ) throw new MismatchedTokenException();
_t = _t.getNextSibling();
_t = __t98;
_t = _t.getNextSibling();
if ( inputState.guessing==0 ) {
// Optimize indexOf + <intValue>:
// The SQL database returns an index starting with 1, so we need
// to decrement the returned index. We can do the derement at compile
// timeCombine, if the other operand is a constant int value.
if ((left1.getType() == INDEXOF) &&
(right1.getType() == VALUE) &&
(right1.getValue() instanceof Integer))
{
// case: indexOf() + intValue
indexOf(left1, ((Integer)right1.getValue()).intValue());
}
else if ((right1.getType() == INDEXOF) &&
(left1.getType() == VALUE) &&
(left1.getValue() instanceof Integer))
{
// case: intValue + indexOf()
indexOf(right1, ((Integer)left1.getValue()).intValue());
}
else
{
expression(right1);
expression(left1);
op1.getRetrieveDesc().addConstraint(null, RetrieveDesc.OP_ADD, null);
}
}
break;
}
case CONCAT:
{
AST __t99 = _t;
op2 = _t==ASTNULL ? null :(JQLAST)_t;
match(_t,CONCAT);
_t = _t.getFirstChild();
left2 = (JQLAST)_t;
if ( _t==null ) throw new MismatchedTokenException();
_t = _t.getNextSibling();
expression(_t);
_t = _retTree;
_t = __t99;
_t = _t.getNextSibling();
if ( inputState.guessing==0 ) {
expression(left2);
op2.getRetrieveDesc().addConstraint(null, RetrieveDesc.OP_CONCAT, null);
}
break;
}
case MINUS:
{
AST __t100 = _t;
op3 = _t==ASTNULL ? null :(JQLAST)_t;
match(_t,MINUS);
_t = _t.getFirstChild();
left3 = (JQLAST)_t;
if ( _t==null ) throw new MismatchedTokenException();
_t = _t.getNextSibling();
right3 = (JQLAST)_t;
if ( _t==null ) throw new MismatchedTokenException();
_t = _t.getNextSibling();
_t = __t100;
_t = _t.getNextSibling();
if ( inputState.guessing==0 ) {
// Optimize indexOf + <intValue>:
// The SQL database returns an index starting with 1, so we need
// to decrement the returned index. We can do the derement at compile
// timeCombine, if the other operand is a constant int value.
if ((left3.getType() == INDEXOF) &&
(right3.getType() == VALUE) &&
(right3.getValue() instanceof Integer))
{
// case: indexOf - intValue
// treated as indexOf + -intValue
indexOf(left3, -((Integer)right3.getValue()).intValue());
}
else
{
expression(right3);
expression(left3);
op3.getRetrieveDesc().addConstraint(null, RetrieveDesc.OP_SUB, null);
}
}
break;
}
case STAR:
{
AST __t101 = _t;
op4 = _t==ASTNULL ? null :(JQLAST)_t;
match(_t,STAR);
_t = _t.getFirstChild();
left4 = (JQLAST)_t;
if ( _t==null ) throw new MismatchedTokenException();
_t = _t.getNextSibling();
expression(_t);
_t = _retTree;
_t = __t101;
_t = _t.getNextSibling();
if ( inputState.guessing==0 ) {
expression(left4);
op4.getRetrieveDesc().addConstraint(null, RetrieveDesc.OP_MUL, null);
}
break;
}
case DIV:
{
AST __t102 = _t;
op5 = _t==ASTNULL ? null :(JQLAST)_t;
match(_t,DIV);
_t = _t.getFirstChild();
left5 = (JQLAST)_t;
if ( _t==null ) throw new MismatchedTokenException();
_t = _t.getNextSibling();
expression(_t);
_t = _retTree;
_t = __t102;
_t = _t.getNextSibling();
if ( inputState.guessing==0 ) {
expression(left5);
op5.getRetrieveDesc().addConstraint(null, RetrieveDesc.OP_DIV, null);
}
break;
}
case MOD:
{
AST __t103 = _t;
op6 = _t==ASTNULL ? null :(JQLAST)_t;
match(_t,MOD);
_t = _t.getFirstChild();
left6 = (JQLAST)_t;
if ( _t==null ) throw new MismatchedTokenException();
_t = _t.getNextSibling();
expression(_t);
_t = _retTree;
_t = __t103;
_t = _t.getNextSibling();