Package antlr

Examples of antlr.MismatchedTokenException


         
        }
      }
      else if (((_t.getType() >= IMPORT && _t.getType() <= DOUBLE_LITERAL))) {
        e = (JQLAST)_t;
        if ( _t==null ) throw new MismatchedTokenException();
        _t = _t.getNextSibling();
        if ( inputState.guessing==0 ) {
         
          errorMsg.unsupported(e.getLine(), e.getColumn(),
          I18NHelper.getMessage(messages,
View Full Code Here


        AST __t42 = _t;
        JQLAST tmp15_AST_in = (JQLAST)_t;
        match(_t,TYPECAST);
        _t = _t.getFirstChild();
        JQLAST tmp16_AST_in = (JQLAST)_t;
        if ( _t==null ) throw new MismatchedTokenException();
        _t = _t.getNextSibling();
        fieldName=collectionExprResult(_t);
        _t = _retTree;
        _t = __t42;
        _t = _t.getNextSibling();
View Full Code Here

        AST __t115 = _t;
        JQLAST tmp20_AST_in = (JQLAST)_t;
        match(_t,CONTAINS);
        _t = _t.getFirstChild();
        JQLAST tmp21_AST_in = (JQLAST)_t;
        if ( _t==null ) throw new MismatchedTokenException();
        _t = _t.getNextSibling();
        JQLAST tmp22_AST_in = (JQLAST)_t;
        match(_t,VARIABLE);
        _t = _t.getNextSibling();
        _t = __t115;
        _t = _t.getNextSibling();
        break;
      }
      case NOT_CONTAINS:
      {
        AST __t116 = _t;
        JQLAST tmp23_AST_in = (JQLAST)_t;
        match(_t,NOT_CONTAINS);
        _t = _t.getFirstChild();
        JQLAST tmp24_AST_in = (JQLAST)_t;
        if ( _t==null ) throw new MismatchedTokenException();
        _t = _t.getNextSibling();
        JQLAST tmp25_AST_in = (JQLAST)_t;
        match(_t,VARIABLE);
        _t = _t.getNextSibling();
        _t = __t116;
View Full Code Here

        AST __t51 = _t;
        op1 = _t==ASTNULL ? null :(JQLAST)_t;
        match(_t,BAND);
        _t = _t.getFirstChild();
        left1 = (JQLAST)_t;
        if ( _t==null ) throw new MismatchedTokenException();
        _t = _t.getNextSibling();
        right1 = _t==ASTNULL ? null : (JQLAST)_t;
        booleanOperationArgument(_t);
        _t = _retTree;
        _t = __t51;
        _t = _t.getNextSibling();
        if ( inputState.guessing==0 ) {
         
          booleanOperationArgument(left1);
          // do not generate boolean operation if one of the operands is variable constraint
          if (pushesValueOnStack(left1) && pushesValueOnStack(right1))
          op1.getRetrieveDesc().addConstraint(null, RetrieveDesc.OP_AND, null);
         
        }
        break;
      }
      case BOR:
      {
        AST __t52 = _t;
        op2 = _t==ASTNULL ? null :(JQLAST)_t;
        match(_t,BOR);
        _t = _t.getFirstChild();
        left2 = (JQLAST)_t;
        if ( _t==null ) throw new MismatchedTokenException();
        _t = _t.getNextSibling();
        right2 = _t==ASTNULL ? null : (JQLAST)_t;
        booleanOperationArgument(_t);
        _t = _retTree;
        _t = __t52;
        _t = _t.getNextSibling();
        if ( inputState.guessing==0 ) {
         
          booleanOperationArgument(left2);
          // do not generate boolean operation if one of the operands is variable constraint
          if (pushesValueOnStack(left2) && pushesValueOnStack(right2))
          op2.getRetrieveDesc().addConstraint(null, RetrieveDesc.OP_OR, null);
         
        }
        break;
      }
      case BXOR:
      {
        AST __t53 = _t;
        op3 = _t==ASTNULL ? null :(JQLAST)_t;
        match(_t,BXOR);
        _t = _t.getFirstChild();
        left3 = (JQLAST)_t;
        if ( _t==null ) throw new MismatchedTokenException();
        _t = _t.getNextSibling();
        right3 = _t==ASTNULL ? null : (JQLAST)_t;
        booleanOperationArgument(_t);
        _t = _retTree;
        _t = __t53;
View Full Code Here

        AST __t55 = _t;
        op1 = _t==ASTNULL ? null :(JQLAST)_t;
        match(_t,AND);
        _t = _t.getFirstChild();
        left1 = (JQLAST)_t;
        if ( _t==null ) throw new MismatchedTokenException();
        _t = _t.getNextSibling();
        right1 = _t==ASTNULL ? null : (JQLAST)_t;
        booleanOperationArgument(_t);
        _t = _retTree;
        _t = __t55;
        _t = _t.getNextSibling();
        if ( inputState.guessing==0 ) {
         
          booleanOperationArgument(left1);
          // do not generate boolean operation if one of the operands is variable constraint
          if (pushesValueOnStack(left1) && pushesValueOnStack(right1))
          op1.getRetrieveDesc().addConstraint(null, RetrieveDesc.OP_AND, null);
         
        }
        break;
      }
      case OR:
      {
        AST __t56 = _t;
        op2 = _t==ASTNULL ? null :(JQLAST)_t;
        match(_t,OR);
        _t = _t.getFirstChild();
        left2 = (JQLAST)_t;
        if ( _t==null ) throw new MismatchedTokenException();
        _t = _t.getNextSibling();
        right2 = _t==ASTNULL ? null : (JQLAST)_t;
        booleanOperationArgument(_t);
        _t = _retTree;
        _t = __t56;
View Full Code Here

              AST __t66 = _t;
              op1 = _t==ASTNULL ? null :(JQLAST)_t;
              match(_t,EQUAL);
              _t = _t.getFirstChild();
              left1 = (JQLAST)_t;
              if ( _t==null ) throw new MismatchedTokenException();
              _t = _t.getNextSibling();
              expression(_t);
              _t = _retTree;
              _t = __t66;
              _t = _t.getNextSibling();
              if ( inputState.guessing==0 ) {
               
                expression(left1);
                op1.getRetrieveDesc().addConstraint(null, RetrieveDesc.OP_EQ, null);
               
              }
            }
            else if ((_t.getType()==NOT_EQUAL)) {
              AST __t67 = _t;
              op2 = _t==ASTNULL ? null :(JQLAST)_t;
              match(_t,NOT_EQUAL);
              _t = _t.getFirstChild();
              left2 = (JQLAST)_t;
              if ( _t==null ) throw new MismatchedTokenException();
              _t = _t.getNextSibling();
              expression(_t);
              _t = _retTree;
              _t = __t67;
              _t = _t.getNextSibling();
              if ( inputState.guessing==0 ) {
               
                expression(left2);
                op2.getRetrieveDesc().addConstraint(null, RetrieveDesc.OP_NE, null);
               
              }
            }
            else if ((_t.getType()==LT)) {
              AST __t68 = _t;
              op3 = _t==ASTNULL ? null :(JQLAST)_t;
              match(_t,LT);
              _t = _t.getFirstChild();
              left3 = (JQLAST)_t;
              if ( _t==null ) throw new MismatchedTokenException();
              _t = _t.getNextSibling();
              expression(_t);
              _t = _retTree;
              _t = __t68;
              _t = _t.getNextSibling();
              if ( inputState.guessing==0 ) {
               
                expression(left3);
                op3.getRetrieveDesc().addConstraint(null, RetrieveDesc.OP_LT, null);
               
              }
            }
            else if ((_t.getType()==GT)) {
              AST __t69 = _t;
              op4 = _t==ASTNULL ? null :(JQLAST)_t;
              match(_t,GT);
              _t = _t.getFirstChild();
              left4 = (JQLAST)_t;
              if ( _t==null ) throw new MismatchedTokenException();
              _t = _t.getNextSibling();
              expression(_t);
              _t = _retTree;
              _t = __t69;
              _t = _t.getNextSibling();
              if ( inputState.guessing==0 ) {
               
                expression(left4);
                op4.getRetrieveDesc().addConstraint(null, RetrieveDesc.OP_GT, null);
               
              }
            }
            else if ((_t.getType()==LE)) {
              AST __t70 = _t;
              op5 = _t==ASTNULL ? null :(JQLAST)_t;
              match(_t,LE);
              _t = _t.getFirstChild();
              left5 = (JQLAST)_t;
              if ( _t==null ) throw new MismatchedTokenException();
              _t = _t.getNextSibling();
              expression(_t);
              _t = _retTree;
              _t = __t70;
              _t = _t.getNextSibling();
              if ( inputState.guessing==0 ) {
               
                expression(left5);
                op5.getRetrieveDesc().addConstraint(null, RetrieveDesc.OP_LE, null);
               
              }
            }
            else if ((_t.getType()==GE)) {
              AST __t71 = _t;
              op6 = _t==ASTNULL ? null :(JQLAST)_t;
              match(_t,GE);
              _t = _t.getFirstChild();
              left6 = (JQLAST)_t;
              if ( _t==null ) throw new MismatchedTokenException();
              _t = _t.getNextSibling();
              expression(_t);
              _t = _retTree;
              _t = __t71;
              _t = _t.getNextSibling();
View Full Code Here

        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();
View Full Code Here

        AST __t112 = _t;
        op2 = _t==ASTNULL ? null :(JQLAST)_t;
        match(_t,LNOT);
        _t = _t.getFirstChild();
        expr = (JQLAST)_t;
        if ( _t==null ) throw new MismatchedTokenException();
        _t = _t.getNextSibling();
        _t = __t112;
        _t = _t.getNextSibling();
        if ( inputState.guessing==0 ) {
          if (expr.getType() == FIELD_ACCESS) {
View Full Code Here

        AST __t95 = _t;
        eq = _t==ASTNULL ? null :(JQLAST)_t;
        match(_t,COLLECTION_EQUAL);
        _t = _t.getFirstChild();
        JQLAST tmp35_AST_in = (JQLAST)_t;
        if ( _t==null ) throw new MismatchedTokenException();
        _t = _t.getNextSibling();
        JQLAST tmp36_AST_in = (JQLAST)_t;
        if ( _t==null ) throw new MismatchedTokenException();
        _t = _t.getNextSibling();
        _t = __t95;
        _t = _t.getNextSibling();
        if ( inputState.guessing==0 ) {
         
          errorMsg.unsupported(eq.getLine(), eq.getColumn(),
          I18NHelper.getMessage(messages,
          "jqlc.codegeneration.collectioncomparison.nonnull")); // NOI18N
         
        }
        break;
      }
      case COLLECTION_NOT_EQUAL:
      {
        AST __t96 = _t;
        ne = _t==ASTNULL ? null :(JQLAST)_t;
        match(_t,COLLECTION_NOT_EQUAL);
        _t = _t.getFirstChild();
        JQLAST tmp37_AST_in = (JQLAST)_t;
        if ( _t==null ) throw new MismatchedTokenException();
        _t = _t.getNextSibling();
        JQLAST tmp38_AST_in = (JQLAST)_t;
        if ( _t==null ) throw new MismatchedTokenException();
        _t = _t.getNextSibling();
        _t = __t96;
        _t = _t.getNextSibling();
        if ( inputState.guessing==0 ) {
         
View Full Code Here

        AST __t93 = _t;
        JQLAST tmp45_AST_in = (JQLAST)_t;
        match(_t,NAVIGATION);
        _t = _t.getFirstChild();
        JQLAST tmp46_AST_in = (JQLAST)_t;
        if ( _t==null ) throw new MismatchedTokenException();
        _t = _t.getNextSibling();
        JQLAST tmp47_AST_in = (JQLAST)_t;
        match(_t,IDENT);
        _t = _t.getNextSibling();
        _t = __t93;
View Full Code Here

TOP

Related Classes of antlr.MismatchedTokenException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.