예제 #1
0
파일: ECLParser.java 프로젝트: mhcxp/isgi
  // $ANTLR start jarSet
  // ECL.g:72:1: jarSet returns [java.util.Set<String> jarSet] : (j1= jar ) ( ',' j2= jar )* ;
  public final java.util.Set<String> jarSet() throws RecognitionException {
    java.util.Set<String> jarSet = null;

    jar_return j1 = null;

    jar_return j2 = null;

    try {
      // ECL.g:73:2: ( (j1= jar ) ( ',' j2= jar )* )
      // ECL.g:73:4: (j1= jar ) ( ',' j2= jar )*
      {
        // ECL.g:73:4: (j1= jar )
        // ECL.g:74:4: j1= jar
        {
          pushFollow(FOLLOW_jar_in_jarSet217);
          j1 = jar();
          _fsp--;

          jarSet.add(input.toString(j1.start, j1.stop));
        }

        // ECL.g:78:3: ( ',' j2= jar )*
        loop8:
        do {
          int alt8 = 2;
          int LA8_0 = input.LA(1);

          if ((LA8_0 == 14)) {
            alt8 = 1;
          }

          switch (alt8) {
            case 1:
              // ECL.g:79:4: ',' j2= jar
              {
                match(input, 14, FOLLOW_14_in_jarSet231);
                pushFollow(FOLLOW_jar_in_jarSet234);
                j2 = jar();
                _fsp--;

                jarSet.add(input.toString(j2.start, j2.stop));
              }
              break;

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

    } catch (RecognitionException re) {
      reportError(re);
      recover(input, re);
    } finally {
    }
    return jarSet;
  }
예제 #2
0
파일: ECLParser.java 프로젝트: mhcxp/isgi
  // $ANTLR start arrayIdSet
  // ECL.g:41:1: arrayIdSet returns [java.util.Set<Long> idSet] : (id1= DIGIT ) ( ',' id2= DIGIT )*
  // ;
  public final java.util.Set<Long> arrayIdSet() throws RecognitionException {
    java.util.Set<Long> idSet = null;

    Token id1 = null;
    Token id2 = null;

    idSet = new java.util.HashSet<Long>();

    try {
      // ECL.g:45:2: ( (id1= DIGIT ) ( ',' id2= DIGIT )* )
      // ECL.g:45:4: (id1= DIGIT ) ( ',' id2= DIGIT )*
      {
        // ECL.g:45:4: (id1= DIGIT )
        // ECL.g:45:5: id1= DIGIT
        {
          id1 = (Token) input.LT(1);
          match(input, DIGIT, FOLLOW_DIGIT_in_arrayIdSet154);

          idSet.add(new Long(id1.getText()));
        }

        // ECL.g:47:5: ( ',' id2= DIGIT )*
        loop7:
        do {
          int alt7 = 2;
          int LA7_0 = input.LA(1);

          if ((LA7_0 == 14)) {
            alt7 = 1;
          }

          switch (alt7) {
            case 1:
              // ECL.g:47:6: ',' id2= DIGIT
              {
                match(input, 14, FOLLOW_14_in_arrayIdSet158);
                id2 = (Token) input.LT(1);
                match(input, DIGIT, FOLLOW_DIGIT_in_arrayIdSet162);

                idSet.add(new Long(id2.getText()));
              }
              break;

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

    } catch (RecognitionException re) {
      reportError(re);
      recover(input, re);
    } finally {
    }
    return idSet;
  }
예제 #3
0
파일: ECLParser.java 프로젝트: mhcxp/isgi
  // $ANTLR start rangeIdSet
  // ECL.g:51:1: rangeIdSet returns [java.util.Set<Long> idSet] : id1= DIGIT '.' '.' id2= DIGIT ;
  public final java.util.Set<Long> rangeIdSet() throws RecognitionException {
    java.util.Set<Long> idSet = null;

    Token id1 = null;
    Token id2 = null;

    idSet = new java.util.HashSet<Long>();
    Long start = 0L;
    Long end = 0L;

    try {
      // ECL.g:56:3: (id1= DIGIT '.' '.' id2= DIGIT )
      // ECL.g:56:6: id1= DIGIT '.' '.' id2= DIGIT
      {
        id1 = (Token) input.LT(1);
        match(input, DIGIT, FOLLOW_DIGIT_in_rangeIdSet184);

        start = new Long(id1.getText());

        match(input, 15, FOLLOW_15_in_rangeIdSet187);
        match(input, 15, FOLLOW_15_in_rangeIdSet189);
        id2 = (Token) input.LT(1);
        match(input, DIGIT, FOLLOW_DIGIT_in_rangeIdSet193);

        end = new Long(id2.getText());

        if (end < start) {
          Long temp = end;
          end = start;
          start = temp;
        }
        for (Long id = start; id <= end; id++) {
          idSet.add(id);
        }
      }

    } catch (RecognitionException re) {
      reportError(re);
      recover(input, re);
    } finally {
    }
    return idSet;
  }