// $ANTLR start "arithmeticexpression"
  // com/pmerienne/eventmonitoring/shared/parser/Criteria.g:79:1: arithmeticexpression : atom (
  // ARITHMETIC_OPERATOR atom )* ;
  public final CriteriaParser.arithmeticexpression_return arithmeticexpression()
      throws RecognitionException {
    CriteriaParser.arithmeticexpression_return retval =
        new CriteriaParser.arithmeticexpression_return();
    retval.start = input.LT(1);

    Object root_0 = null;

    Token ARITHMETIC_OPERATOR12 = null;
    CriteriaParser.atom_return atom11 = null;

    CriteriaParser.atom_return atom13 = null;

    Object ARITHMETIC_OPERATOR12_tree = null;

    try {
      // com/pmerienne/eventmonitoring/shared/parser/Criteria.g:79:22: ( atom ( ARITHMETIC_OPERATOR
      // atom )* )
      // com/pmerienne/eventmonitoring/shared/parser/Criteria.g:79:24: atom ( ARITHMETIC_OPERATOR
      // atom )*
      {
        root_0 = (Object) adaptor.nil();

        pushFollow(FOLLOW_atom_in_arithmeticexpression460);
        atom11 = atom();

        state._fsp--;

        adaptor.addChild(root_0, atom11.getTree());
        // com/pmerienne/eventmonitoring/shared/parser/Criteria.g:79:29: ( ARITHMETIC_OPERATOR atom
        // )*
        loop4:
        do {
          int alt4 = 2;
          switch (input.LA(1)) {
            case ARITHMETIC_OPERATOR:
              {
                alt4 = 1;
              }
              break;
          }

          switch (alt4) {
            case 1:
              // com/pmerienne/eventmonitoring/shared/parser/Criteria.g:79:30: ARITHMETIC_OPERATOR
              // atom
              {
                ARITHMETIC_OPERATOR12 =
                    (Token)
                        match(
                            input,
                            ARITHMETIC_OPERATOR,
                            FOLLOW_ARITHMETIC_OPERATOR_in_arithmeticexpression463);
                ARITHMETIC_OPERATOR12_tree = (Object) adaptor.create(ARITHMETIC_OPERATOR12);
                root_0 = (Object) adaptor.becomeRoot(ARITHMETIC_OPERATOR12_tree, root_0);

                pushFollow(FOLLOW_atom_in_arithmeticexpression466);
                atom13 = atom();

                state._fsp--;

                adaptor.addChild(root_0, atom13.getTree());
              }
              break;

            default:
              break loop4;
          }
        } while (true);
      }

      retval.stop = input.LT(-1);

      retval.tree = (Object) adaptor.rulePostProcessing(root_0);
      adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

    } catch (RecognitionException re) {
      reportError(re);
      recover(input, re);
      retval.tree = (Object) adaptor.errorNode(input, retval.start, input.LT(-1), re);

    } finally {
    }
    return retval;
  }
  // $ANTLR start "logicalexpression"
  // com/pmerienne/eventmonitoring/shared/parser/Criteria.g:77:1: logicalexpression :
  // arithmeticexpression ( ( LT | LTE | GT | GTE | IS | NE ) arithmeticexpression )* ;
  public final CriteriaParser.logicalexpression_return logicalexpression()
      throws RecognitionException {
    CriteriaParser.logicalexpression_return retval = new CriteriaParser.logicalexpression_return();
    retval.start = input.LT(1);

    Object root_0 = null;

    Token set9 = null;
    CriteriaParser.arithmeticexpression_return arithmeticexpression8 = null;

    CriteriaParser.arithmeticexpression_return arithmeticexpression10 = null;

    Object set9_tree = null;

    try {
      // com/pmerienne/eventmonitoring/shared/parser/Criteria.g:77:19: ( arithmeticexpression ( ( LT
      // | LTE | GT | GTE | IS | NE ) arithmeticexpression )* )
      // com/pmerienne/eventmonitoring/shared/parser/Criteria.g:77:21: arithmeticexpression ( ( LT |
      // LTE | GT | GTE | IS | NE ) arithmeticexpression )*
      {
        root_0 = (Object) adaptor.nil();

        pushFollow(FOLLOW_arithmeticexpression_in_logicalexpression422);
        arithmeticexpression8 = arithmeticexpression();

        state._fsp--;

        adaptor.addChild(root_0, arithmeticexpression8.getTree());
        // com/pmerienne/eventmonitoring/shared/parser/Criteria.g:77:42: ( ( LT | LTE | GT | GTE |
        // IS | NE ) arithmeticexpression )*
        loop3:
        do {
          int alt3 = 2;
          switch (input.LA(1)) {
            case LT:
            case LTE:
            case GT:
            case GTE:
            case IS:
            case NE:
              {
                alt3 = 1;
              }
              break;
          }

          switch (alt3) {
            case 1:
              // com/pmerienne/eventmonitoring/shared/parser/Criteria.g:77:43: ( LT | LTE | GT | GTE
              // | IS | NE ) arithmeticexpression
              {
                set9 = (Token) input.LT(1);
                set9 = (Token) input.LT(1);
                if ((input.LA(1) >= LT && input.LA(1) <= NE)) {
                  input.consume();
                  root_0 = (Object) adaptor.becomeRoot((Object) adaptor.create(set9), root_0);
                  state.errorRecovery = false;
                } else {
                  MismatchedSetException mse = new MismatchedSetException(null, input);
                  throw mse;
                }

                pushFollow(FOLLOW_arithmeticexpression_in_logicalexpression450);
                arithmeticexpression10 = arithmeticexpression();

                state._fsp--;

                adaptor.addChild(root_0, arithmeticexpression10.getTree());
              }
              break;

            default:
              break loop3;
          }
        } while (true);
      }

      retval.stop = input.LT(-1);

      retval.tree = (Object) adaptor.rulePostProcessing(root_0);
      adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

    } catch (RecognitionException re) {
      reportError(re);
      recover(input, re);
      retval.tree = (Object) adaptor.errorNode(input, retval.start, input.LT(-1), re);

    } finally {
    }
    return retval;
  }