Exemplo n.º 1
0
  // $ANTLR start "line"
  // /home/jon/flume/src/antlr/FlumeShell.g:88:1: line : command EOF -> command ;
  public final FlumeShellParser.line_return line() throws RecognitionException {
    FlumeShellParser.line_return retval = new FlumeShellParser.line_return();
    retval.start = input.LT(1);

    Object root_0 = null;

    Token EOF6 = null;
    FlumeShellParser.command_return command5 = null;

    Object EOF6_tree = null;
    RewriteRuleTokenStream stream_EOF = new RewriteRuleTokenStream(adaptor, "token EOF");
    RewriteRuleSubtreeStream stream_command = new RewriteRuleSubtreeStream(adaptor, "rule command");
    try {
      // /home/jon/flume/src/antlr/FlumeShell.g:88:6: ( command EOF -> command )
      // /home/jon/flume/src/antlr/FlumeShell.g:88:8: command EOF
      {
        pushFollow(FOLLOW_command_in_line107);
        command5 = command();

        state._fsp--;

        stream_command.add(command5.getTree());
        EOF6 = (Token) match(input, EOF, FOLLOW_EOF_in_line109);
        stream_EOF.add(EOF6);

        // AST REWRITE
        // elements: command
        // token labels:
        // rule labels: retval
        // token list labels:
        // rule list labels:
        // wildcard labels:
        retval.tree = root_0;
        RewriteRuleSubtreeStream stream_retval =
            new RewriteRuleSubtreeStream(
                adaptor, "rule retval", retval != null ? retval.tree : null);

        root_0 = (Object) adaptor.nil();
        // 88:20: -> command
        {
          adaptor.addChild(root_0, stream_command.nextTree());
        }

        retval.tree = root_0;
      }

      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;
  }
Exemplo n.º 2
0
  // $ANTLR start "nonSwitchOption"
  // /Users/tom/Projects/netbeans/jet-main/java.j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/vmo/gen/CommandLine.g:279:1: nonSwitchOption : t= TEXT ->;
  public final CommandLineParser.nonSwitchOption_return nonSwitchOption()
      throws RecognitionException {
    CommandLineParser.nonSwitchOption_return retval =
        new CommandLineParser.nonSwitchOption_return();
    retval.start = input.LT(1);

    CommonTree root_0 = null;

    Token t = null;

    CommonTree t_tree = null;
    RewriteRuleTokenStream stream_TEXT = new RewriteRuleTokenStream(adaptor, "token TEXT");

    try {
      // /Users/tom/Projects/netbeans/jet-main/java.j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/vmo/gen/CommandLine.g:280:2: (t= TEXT ->)
      // /Users/tom/Projects/netbeans/jet-main/java.j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/vmo/gen/CommandLine.g:280:4: t= TEXT
      {
        t = (Token) match(input, TEXT, FOLLOW_TEXT_in_nonSwitchOption359);
        stream_TEXT.add(t);

        // AST REWRITE
        // elements:
        // token labels:
        // rule labels: retval
        // token list labels:
        // rule list labels:
        // wildcard labels:
        retval.tree = root_0;
        RewriteRuleSubtreeStream stream_retval =
            new RewriteRuleSubtreeStream(
                adaptor, "rule retval", retval != null ? retval.tree : null);

        root_0 = (CommonTree) adaptor.nil();
        // 280:11: ->
        {
          adaptor.addChild(root_0, new UnknownOption(t));
        }

        retval.tree = root_0;
      }

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

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

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

    } finally {
    }
    return retval;
  }
  // $ANTLR start "json_argument"
  // AnnotationParser.g:125:1: json_argument : STRING_LITERAL ASIG ( STRING_LITERAL | STRING ) ;
  public final AnnotationParser.json_argument_return json_argument() throws RecognitionException {
    AnnotationParser.json_argument_return retval = new AnnotationParser.json_argument_return();
    retval.start = input.LT(1);

    AnnotationCommonTree root_0 = null;

    CommonToken STRING_LITERAL24 = null;
    CommonToken ASIG25 = null;
    CommonToken set26 = null;

    AnnotationCommonTree STRING_LITERAL24_tree = null;
    AnnotationCommonTree ASIG25_tree = null;
    AnnotationCommonTree set26_tree = null;

    try {
      // AnnotationParser.g:126:3: ( STRING_LITERAL ASIG ( STRING_LITERAL | STRING ) )
      // AnnotationParser.g:126:5: STRING_LITERAL ASIG ( STRING_LITERAL | STRING )
      {
        root_0 = (AnnotationCommonTree) adaptor.nil();

        STRING_LITERAL24 =
            (CommonToken) match(input, STRING_LITERAL, FOLLOW_STRING_LITERAL_in_json_argument386);
        STRING_LITERAL24_tree = (AnnotationCommonTree) adaptor.create(STRING_LITERAL24);
        adaptor.addChild(root_0, STRING_LITERAL24_tree);

        ASIG25 = (CommonToken) match(input, ASIG, FOLLOW_ASIG_in_json_argument388);
        ASIG25_tree = (AnnotationCommonTree) adaptor.create(ASIG25);
        adaptor.addChild(root_0, ASIG25_tree);

        set26 = (CommonToken) input.LT(1);
        if (input.LA(1) == STRING || input.LA(1) == STRING_LITERAL) {
          input.consume();
          adaptor.addChild(root_0, (AnnotationCommonTree) adaptor.create(set26));
          state.errorRecovery = false;
        } else {
          MismatchedSetException mse = new MismatchedSetException(null, input);
          throw mse;
        }
      }

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

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

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

    } finally {
    }
    return retval;
  }
  // $ANTLR start "expression"
  // com/pmerienne/eventmonitoring/shared/parser/Criteria.g:69:1: expression : andexpression ;
  public final CriteriaParser.expression_return expression() throws RecognitionException {
    CriteriaParser.expression_return retval = new CriteriaParser.expression_return();
    retval.start = input.LT(1);

    Object root_0 = null;

    CriteriaParser.andexpression_return andexpression1 = null;

    try {
      // com/pmerienne/eventmonitoring/shared/parser/Criteria.g:69:12: ( andexpression )
      // com/pmerienne/eventmonitoring/shared/parser/Criteria.g:69:14: andexpression
      {
        root_0 = (Object) adaptor.nil();

        pushFollow(FOLLOW_andexpression_in_expression380);
        andexpression1 = andexpression();

        state._fsp--;

        adaptor.addChild(root_0, andexpression1.getTree());
      }

      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 "argument_list"
  // AnnotationParser.g:78:1: argument_list : ( PARAM_START ( arguments )? PARAM_END )? -> ^(
  // ARGUMENT_LIST ( arguments )? ) ;
  public final AnnotationParser.argument_list_return argument_list() throws RecognitionException {
    AnnotationParser.argument_list_return retval = new AnnotationParser.argument_list_return();
    retval.start = input.LT(1);

    AnnotationCommonTree root_0 = null;

    CommonToken PARAM_START4 = null;
    CommonToken PARAM_END6 = null;
    AnnotationParser.arguments_return arguments5 = null;

    AnnotationCommonTree PARAM_START4_tree = null;
    AnnotationCommonTree PARAM_END6_tree = null;
    RewriteRuleTokenStream stream_PARAM_START =
        new RewriteRuleTokenStream(adaptor, "token PARAM_START");
    RewriteRuleTokenStream stream_PARAM_END =
        new RewriteRuleTokenStream(adaptor, "token PARAM_END");
    RewriteRuleSubtreeStream stream_arguments =
        new RewriteRuleSubtreeStream(adaptor, "rule arguments");
    try {
      // AnnotationParser.g:79:3: ( ( PARAM_START ( arguments )? PARAM_END )? -> ^( ARGUMENT_LIST (
      // arguments )? ) )
      // AnnotationParser.g:79:5: ( PARAM_START ( arguments )? PARAM_END )?
      {
        // AnnotationParser.g:79:5: ( PARAM_START ( arguments )? PARAM_END )?
        int alt2 = 2;
        int LA2_0 = input.LA(1);

        if ((LA2_0 == PARAM_START)) {
          alt2 = 1;
        }
        switch (alt2) {
          case 1:
            // AnnotationParser.g:79:6: PARAM_START ( arguments )? PARAM_END
            {
              PARAM_START4 =
                  (CommonToken) match(input, PARAM_START, FOLLOW_PARAM_START_in_argument_list122);
              stream_PARAM_START.add(PARAM_START4);

              // AnnotationParser.g:79:18: ( arguments )?
              int alt1 = 2;
              int LA1_0 = input.LA(1);

              if ((LA1_0 == JSON_START || LA1_0 == STRING || LA1_0 == STRING_LITERAL)) {
                alt1 = 1;
              }
              switch (alt1) {
                case 1:
                  // AnnotationParser.g:79:18: arguments
                  {
                    pushFollow(FOLLOW_arguments_in_argument_list124);
                    arguments5 = arguments();

                    state._fsp--;

                    stream_arguments.add(arguments5.getTree());
                  }
                  break;
              }

              PARAM_END6 =
                  (CommonToken) match(input, PARAM_END, FOLLOW_PARAM_END_in_argument_list127);
              stream_PARAM_END.add(PARAM_END6);
            }
            break;
        }

        // AST REWRITE
        // elements: arguments
        // token labels:
        // rule labels: retval
        // token list labels:
        // rule list labels:
        // wildcard labels:
        retval.tree = root_0;
        RewriteRuleSubtreeStream stream_retval =
            new RewriteRuleSubtreeStream(
                adaptor, "rule retval", retval != null ? retval.tree : null);

        root_0 = (AnnotationCommonTree) adaptor.nil();
        // 80:5: -> ^( ARGUMENT_LIST ( arguments )? )
        {
          // AnnotationParser.g:80:8: ^( ARGUMENT_LIST ( arguments )? )
          {
            AnnotationCommonTree root_1 = (AnnotationCommonTree) adaptor.nil();
            root_1 =
                (AnnotationCommonTree)
                    adaptor.becomeRoot(
                        (AnnotationCommonTree) adaptor.create(ARGUMENT_LIST, "ARGUMENT_LIST"),
                        root_1);

            // AnnotationParser.g:80:24: ( arguments )?
            if (stream_arguments.hasNext()) {
              adaptor.addChild(root_1, stream_arguments.nextTree());
            }
            stream_arguments.reset();

            adaptor.addChild(root_0, root_1);
          }
        }

        retval.tree = root_0;
      }

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

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

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

    } finally {
    }
    return retval;
  }
  // $ANTLR start "literal_argument"
  // AnnotationParser.g:107:1: literal_argument : param= STRING_LITERAL -> ^( LITERAL_ARG $param) ;
  public final AnnotationParser.literal_argument_return literal_argument()
      throws RecognitionException {
    AnnotationParser.literal_argument_return retval =
        new AnnotationParser.literal_argument_return();
    retval.start = input.LT(1);

    AnnotationCommonTree root_0 = null;

    CommonToken param = null;

    AnnotationCommonTree param_tree = null;
    RewriteRuleTokenStream stream_STRING_LITERAL =
        new RewriteRuleTokenStream(adaptor, "token STRING_LITERAL");

    try {
      // AnnotationParser.g:108:3: (param= STRING_LITERAL -> ^( LITERAL_ARG $param) )
      // AnnotationParser.g:108:5: param= STRING_LITERAL
      {
        param =
            (CommonToken)
                match(input, STRING_LITERAL, FOLLOW_STRING_LITERAL_in_literal_argument282);
        stream_STRING_LITERAL.add(param);

        // AST REWRITE
        // elements: param
        // token labels: param
        // rule labels: retval
        // token list labels:
        // rule list labels:
        // wildcard labels:
        retval.tree = root_0;
        RewriteRuleTokenStream stream_param =
            new RewriteRuleTokenStream(adaptor, "token param", param);
        RewriteRuleSubtreeStream stream_retval =
            new RewriteRuleSubtreeStream(
                adaptor, "rule retval", retval != null ? retval.tree : null);

        root_0 = (AnnotationCommonTree) adaptor.nil();
        // 109:5: -> ^( LITERAL_ARG $param)
        {
          // AnnotationParser.g:109:8: ^( LITERAL_ARG $param)
          {
            AnnotationCommonTree root_1 = (AnnotationCommonTree) adaptor.nil();
            root_1 =
                (AnnotationCommonTree)
                    adaptor.becomeRoot(
                        (AnnotationCommonTree) adaptor.create(LITERAL_ARG, "LITERAL_ARG"), root_1);

            adaptor.addChild(root_1, stream_param.nextNode());

            adaptor.addChild(root_0, root_1);
          }
        }

        retval.tree = root_0;
      }

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

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

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

    } finally {
    }
    return retval;
  }
  // $ANTLR start "named_argument"
  // AnnotationParser.g:112:1: named_argument : param= STRING ASIG rhtype -> ^( NAMED_ARG $param
  // rhtype ) ;
  public final AnnotationParser.named_argument_return named_argument() throws RecognitionException {
    AnnotationParser.named_argument_return retval = new AnnotationParser.named_argument_return();
    retval.start = input.LT(1);

    AnnotationCommonTree root_0 = null;

    CommonToken param = null;
    CommonToken ASIG16 = null;
    AnnotationParser.rhtype_return rhtype17 = null;

    AnnotationCommonTree param_tree = null;
    AnnotationCommonTree ASIG16_tree = null;
    RewriteRuleTokenStream stream_ASIG = new RewriteRuleTokenStream(adaptor, "token ASIG");
    RewriteRuleTokenStream stream_STRING = new RewriteRuleTokenStream(adaptor, "token STRING");
    RewriteRuleSubtreeStream stream_rhtype = new RewriteRuleSubtreeStream(adaptor, "rule rhtype");
    try {
      // AnnotationParser.g:113:3: (param= STRING ASIG rhtype -> ^( NAMED_ARG $param rhtype ) )
      // AnnotationParser.g:113:5: param= STRING ASIG rhtype
      {
        param = (CommonToken) match(input, STRING, FOLLOW_STRING_in_named_argument310);
        stream_STRING.add(param);

        ASIG16 = (CommonToken) match(input, ASIG, FOLLOW_ASIG_in_named_argument312);
        stream_ASIG.add(ASIG16);

        pushFollow(FOLLOW_rhtype_in_named_argument314);
        rhtype17 = rhtype();

        state._fsp--;

        stream_rhtype.add(rhtype17.getTree());

        // AST REWRITE
        // elements: rhtype, param
        // token labels: param
        // rule labels: retval
        // token list labels:
        // rule list labels:
        // wildcard labels:
        retval.tree = root_0;
        RewriteRuleTokenStream stream_param =
            new RewriteRuleTokenStream(adaptor, "token param", param);
        RewriteRuleSubtreeStream stream_retval =
            new RewriteRuleSubtreeStream(
                adaptor, "rule retval", retval != null ? retval.tree : null);

        root_0 = (AnnotationCommonTree) adaptor.nil();
        // 114:5: -> ^( NAMED_ARG $param rhtype )
        {
          // AnnotationParser.g:114:8: ^( NAMED_ARG $param rhtype )
          {
            AnnotationCommonTree root_1 = (AnnotationCommonTree) adaptor.nil();
            root_1 =
                (AnnotationCommonTree)
                    adaptor.becomeRoot(
                        (AnnotationCommonTree) adaptor.create(NAMED_ARG, "NAMED_ARG"), root_1);

            adaptor.addChild(root_1, stream_param.nextNode());
            adaptor.addChild(root_1, stream_rhtype.nextTree());

            adaptor.addChild(root_0, root_1);
          }
        }

        retval.tree = root_0;
      }

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

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

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

    } finally {
    }
    return retval;
  }
  // $ANTLR start "atom"
  // com/pmerienne/eventmonitoring/shared/parser/Criteria.g:82:1: atom : ( NULL | NUMBER | STRING |
  // FIELD | LPAREN andexpression RPAREN );
  public final CriteriaParser.atom_return atom() throws RecognitionException {
    CriteriaParser.atom_return retval = new CriteriaParser.atom_return();
    retval.start = input.LT(1);

    Object root_0 = null;

    Token NULL14 = null;
    Token NUMBER15 = null;
    Token STRING16 = null;
    Token FIELD17 = null;
    Token LPAREN18 = null;
    Token RPAREN20 = null;
    CriteriaParser.andexpression_return andexpression19 = null;

    Object NULL14_tree = null;
    Object NUMBER15_tree = null;
    Object STRING16_tree = null;
    Object FIELD17_tree = null;
    Object LPAREN18_tree = null;
    Object RPAREN20_tree = null;

    try {
      // com/pmerienne/eventmonitoring/shared/parser/Criteria.g:82:6: ( NULL | NUMBER | STRING |
      // FIELD | LPAREN andexpression RPAREN )
      int alt5 = 5;
      switch (input.LA(1)) {
        case NULL:
          {
            alt5 = 1;
          }
          break;
        case NUMBER:
          {
            alt5 = 2;
          }
          break;
        case STRING:
          {
            alt5 = 3;
          }
          break;
        case FIELD:
          {
            alt5 = 4;
          }
          break;
        case LPAREN:
          {
            alt5 = 5;
          }
          break;
        default:
          NoViableAltException nvae = new NoViableAltException("", 5, 0, input);

          throw nvae;
      }

      switch (alt5) {
        case 1:
          // com/pmerienne/eventmonitoring/shared/parser/Criteria.g:82:8: NULL
          {
            root_0 = (Object) adaptor.nil();

            NULL14 = (Token) match(input, NULL, FOLLOW_NULL_in_atom477);
            NULL14_tree = (Object) adaptor.create(NULL14);
            adaptor.addChild(root_0, NULL14_tree);
          }
          break;
        case 2:
          // com/pmerienne/eventmonitoring/shared/parser/Criteria.g:82:14: NUMBER
          {
            root_0 = (Object) adaptor.nil();

            NUMBER15 = (Token) match(input, NUMBER, FOLLOW_NUMBER_in_atom480);
            NUMBER15_tree = (Object) adaptor.create(NUMBER15);
            adaptor.addChild(root_0, NUMBER15_tree);
          }
          break;
        case 3:
          // com/pmerienne/eventmonitoring/shared/parser/Criteria.g:82:23: STRING
          {
            root_0 = (Object) adaptor.nil();

            STRING16 = (Token) match(input, STRING, FOLLOW_STRING_in_atom484);
            STRING16_tree = (Object) adaptor.create(STRING16);
            adaptor.addChild(root_0, STRING16_tree);
          }
          break;
        case 4:
          // com/pmerienne/eventmonitoring/shared/parser/Criteria.g:82:32: FIELD
          {
            root_0 = (Object) adaptor.nil();

            FIELD17 = (Token) match(input, FIELD, FOLLOW_FIELD_in_atom488);
            FIELD17_tree = (Object) adaptor.create(FIELD17);
            adaptor.addChild(root_0, FIELD17_tree);
          }
          break;
        case 5:
          // com/pmerienne/eventmonitoring/shared/parser/Criteria.g:82:40: LPAREN andexpression
          // RPAREN
          {
            root_0 = (Object) adaptor.nil();

            LPAREN18 = (Token) match(input, LPAREN, FOLLOW_LPAREN_in_atom492);
            pushFollow(FOLLOW_andexpression_in_atom495);
            andexpression19 = andexpression();

            state._fsp--;

            adaptor.addChild(root_0, andexpression19.getTree());
            RPAREN20 = (Token) match(input, RPAREN, FOLLOW_RPAREN_in_atom497);
          }
          break;
      }
      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;
  }
Exemplo n.º 9
0
  // $ANTLR start "command"
  // /home/jon/flume/src/antlr/FlumeShell.g:90:1: command : ( literal )+ -> ^( CMD ( literal )+ ) ;
  public final FlumeShellParser.command_return command() throws RecognitionException {
    FlumeShellParser.command_return retval = new FlumeShellParser.command_return();
    retval.start = input.LT(1);

    Object root_0 = null;

    FlumeShellParser.literal_return literal7 = null;

    RewriteRuleSubtreeStream stream_literal = new RewriteRuleSubtreeStream(adaptor, "rule literal");
    try {
      // /home/jon/flume/src/antlr/FlumeShell.g:90:9: ( ( literal )+ -> ^( CMD ( literal )+ ) )
      // /home/jon/flume/src/antlr/FlumeShell.g:90:11: ( literal )+
      {
        // /home/jon/flume/src/antlr/FlumeShell.g:90:11: ( literal )+
        int cnt2 = 0;
        loop2:
        do {
          int alt2 = 2;
          int LA2_0 = input.LA(1);

          if (((LA2_0 >= DQuoteLiteral && LA2_0 <= Argument))) {
            alt2 = 1;
          }

          switch (alt2) {
            case 1:
              // /home/jon/flume/src/antlr/FlumeShell.g:90:11: literal
              {
                pushFollow(FOLLOW_literal_in_command122);
                literal7 = literal();

                state._fsp--;

                stream_literal.add(literal7.getTree());
              }
              break;

            default:
              if (cnt2 >= 1) break loop2;
              EarlyExitException eee = new EarlyExitException(2, input);
              throw eee;
          }
          cnt2++;
        } while (true);

        // AST REWRITE
        // elements: literal
        // token labels:
        // rule labels: retval
        // token list labels:
        // rule list labels:
        // wildcard labels:
        retval.tree = root_0;
        RewriteRuleSubtreeStream stream_retval =
            new RewriteRuleSubtreeStream(
                adaptor, "rule retval", retval != null ? retval.tree : null);

        root_0 = (Object) adaptor.nil();
        // 90:20: -> ^( CMD ( literal )+ )
        {
          // /home/jon/flume/src/antlr/FlumeShell.g:90:23: ^( CMD ( literal )+ )
          {
            Object root_1 = (Object) adaptor.nil();
            root_1 = (Object) adaptor.becomeRoot((Object) adaptor.create(CMD, "CMD"), root_1);

            if (!(stream_literal.hasNext())) {
              throw new RewriteEarlyExitException();
            }
            while (stream_literal.hasNext()) {
              adaptor.addChild(root_1, stream_literal.nextTree());
            }
            stream_literal.reset();

            adaptor.addChild(root_0, root_1);
          }
        }

        retval.tree = root_0;
      }

      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;
  }
Exemplo n.º 10
0
  // $ANTLR start "andexpression"
  // com/pmerienne/eventmonitoring/shared/parser/Criteria.g:72:1: andexpression : orexpression ( AND
  // orexpression )* ;
  public final CriteriaParser.andexpression_return andexpression() throws RecognitionException {
    CriteriaParser.andexpression_return retval = new CriteriaParser.andexpression_return();
    retval.start = input.LT(1);

    Object root_0 = null;

    Token AND3 = null;
    CriteriaParser.orexpression_return orexpression2 = null;

    CriteriaParser.orexpression_return orexpression4 = null;

    Object AND3_tree = null;

    try {
      // com/pmerienne/eventmonitoring/shared/parser/Criteria.g:72:15: ( orexpression ( AND
      // orexpression )* )
      // com/pmerienne/eventmonitoring/shared/parser/Criteria.g:72:17: orexpression ( AND
      // orexpression )*
      {
        root_0 = (Object) adaptor.nil();

        pushFollow(FOLLOW_orexpression_in_andexpression389);
        orexpression2 = orexpression();

        state._fsp--;

        adaptor.addChild(root_0, orexpression2.getTree());
        // com/pmerienne/eventmonitoring/shared/parser/Criteria.g:72:30: ( AND orexpression )*
        loop1:
        do {
          int alt1 = 2;
          switch (input.LA(1)) {
            case AND:
              {
                alt1 = 1;
              }
              break;
          }

          switch (alt1) {
            case 1:
              // com/pmerienne/eventmonitoring/shared/parser/Criteria.g:72:31: AND orexpression
              {
                AND3 = (Token) match(input, AND, FOLLOW_AND_in_andexpression392);
                AND3_tree = (Object) adaptor.create(AND3);
                root_0 = (Object) adaptor.becomeRoot(AND3_tree, root_0);

                pushFollow(FOLLOW_orexpression_in_andexpression395);
                orexpression4 = orexpression();

                state._fsp--;

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

            default:
              break loop1;
          }
        } 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;
  }
Exemplo n.º 11
0
  // $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;
  }
Exemplo n.º 12
0
  // $ANTLR start "vmOptions"
  // /Users/tom/Projects/netbeans/jet-main/java.j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/vmo/gen/CommandLine.g:251:1: vmOptions : ( ( WS )? option )* ( WS )? -> ( option )* ;
  public final CommandLineParser.vmOptions_return vmOptions() throws RecognitionException {
    CommandLineParser.vmOptions_return retval = new CommandLineParser.vmOptions_return();
    retval.start = input.LT(1);

    CommonTree root_0 = null;

    Token WS1 = null;
    Token WS3 = null;
    CommandLineParser.option_return option2 = null;

    CommonTree WS1_tree = null;
    CommonTree WS3_tree = null;
    RewriteRuleTokenStream stream_WS = new RewriteRuleTokenStream(adaptor, "token WS");
    RewriteRuleSubtreeStream stream_option = new RewriteRuleSubtreeStream(adaptor, "rule option");
    try {
      // /Users/tom/Projects/netbeans/jet-main/java.j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/vmo/gen/CommandLine.g:252:2: ( ( ( WS )? option )* ( WS )? -> ( option )* )
      // /Users/tom/Projects/netbeans/jet-main/java.j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/vmo/gen/CommandLine.g:252:4: ( ( WS )? option )* ( WS )?
      {
        // /Users/tom/Projects/netbeans/jet-main/java.j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/vmo/gen/CommandLine.g:252:4: ( ( WS )? option )*
        loop2:
        do {
          int alt2 = 2;
          int LA2_0 = input.LA(1);

          if ((LA2_0 == WS)) {
            int LA2_1 = input.LA(2);

            if ((LA2_1 == TEXT || LA2_1 == 7)) {
              alt2 = 1;
            }

          } else if ((LA2_0 == TEXT || LA2_0 == 7)) {
            alt2 = 1;
          }

          switch (alt2) {
            case 1:
              // /Users/tom/Projects/netbeans/jet-main/java.j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/vmo/gen/CommandLine.g:252:5: ( WS )? option
              {
                // /Users/tom/Projects/netbeans/jet-main/java.j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/vmo/gen/CommandLine.g:252:5: ( WS )?
                int alt1 = 2;
                int LA1_0 = input.LA(1);

                if ((LA1_0 == WS)) {
                  alt1 = 1;
                }
                switch (alt1) {
                  case 1:
                    // /Users/tom/Projects/netbeans/jet-main/java.j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/vmo/gen/CommandLine.g:252:5: WS
                    {
                      WS1 = (Token) match(input, WS, FOLLOW_WS_in_vmOptions75);
                      stream_WS.add(WS1);
                    }
                    break;
                }

                pushFollow(FOLLOW_option_in_vmOptions77);
                option2 = option();

                state._fsp--;

                stream_option.add(option2.getTree());
              }
              break;

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

        // /Users/tom/Projects/netbeans/jet-main/java.j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/vmo/gen/CommandLine.g:252:16: ( WS )?
        int alt3 = 2;
        int LA3_0 = input.LA(1);

        if ((LA3_0 == WS)) {
          alt3 = 1;
        }
        switch (alt3) {
          case 1:
            // /Users/tom/Projects/netbeans/jet-main/java.j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/vmo/gen/CommandLine.g:252:16: WS
            {
              WS3 = (Token) match(input, WS, FOLLOW_WS_in_vmOptions80);
              stream_WS.add(WS3);
            }
            break;
        }

        // AST REWRITE
        // elements: option
        // token labels:
        // rule labels: retval
        // token list labels:
        // rule list labels:
        // wildcard labels:
        retval.tree = root_0;
        RewriteRuleSubtreeStream stream_retval =
            new RewriteRuleSubtreeStream(
                adaptor, "rule retval", retval != null ? retval.tree : null);

        root_0 = (CommonTree) adaptor.nil();
        // 252:20: -> ( option )*
        {
          // /Users/tom/Projects/netbeans/jet-main/java.j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/vmo/gen/CommandLine.g:252:23: ( option )*
          while (stream_option.hasNext()) {
            adaptor.addChild(root_0, stream_option.nextTree());
          }
          stream_option.reset();
        }

        retval.tree = root_0;
      }

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

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

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

    } finally {
    }
    return retval;
  }
Exemplo n.º 13
0
  // $ANTLR start "switchOption"
  // /Users/tom/Projects/netbeans/jet-main/java.j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/vmo/gen/CommandLine.g:257:1: switchOption : ({...}? =>t= TEXT -> | {...}? =>t= TEXT -> | {...}? =>t= TEXT -> | {...}? =>t= TEXT -> | {...}? =>t= TEXT -> | {...}? =>t= TEXT '=' eText -> | {...}? =>t= TEXT -> | {...}? =>t= TEXT -> | {...}? =>t= TEXT WS eText -> | t= TEXT ->);
  public final CommandLineParser.switchOption_return switchOption() throws RecognitionException {
    CommandLineParser.switchOption_return retval = new CommandLineParser.switchOption_return();
    retval.start = input.LT(1);

    CommonTree root_0 = null;

    Token t = null;
    Token char_literal7 = null;
    Token WS9 = null;
    CommandLineParser.eText_return eText8 = null;

    CommandLineParser.eText_return eText10 = null;

    CommonTree t_tree = null;
    CommonTree char_literal7_tree = null;
    CommonTree WS9_tree = null;
    RewriteRuleTokenStream stream_WS = new RewriteRuleTokenStream(adaptor, "token WS");
    RewriteRuleTokenStream stream_TEXT = new RewriteRuleTokenStream(adaptor, "token TEXT");
    RewriteRuleTokenStream stream_8 = new RewriteRuleTokenStream(adaptor, "token 8");
    RewriteRuleSubtreeStream stream_eText = new RewriteRuleSubtreeStream(adaptor, "rule eText");

    int index = 0;
    String name = null;
    String value = null;

    try {
      // /Users/tom/Projects/netbeans/jet-main/java.j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/vmo/gen/CommandLine.g:263:2: ({...}? =>t= TEXT -> | {...}? =>t= TEXT -> | {...}? =>t= TEXT -> | {...}? =>t= TEXT -> | {...}? =>t= TEXT -> | {...}? =>t= TEXT '=' eText -> | {...}? =>t= TEXT -> | {...}? =>t= TEXT -> | {...}? =>t= TEXT WS eText -> | t= TEXT ->)
      int alt5 = 10;
      alt5 = dfa5.predict(input);
      switch (alt5) {
        case 1:
          // /Users/tom/Projects/netbeans/jet-main/java.j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/vmo/gen/CommandLine.g:263:4: {...}? =>t= TEXT
          {
            if (!((switchOptions.contains(input.LT(1).getText())))) {
              throw new FailedPredicateException(
                  input, "switchOption", "switchOptions.contains(input.LT(1).getText())");
            }
            t = (Token) match(input, TEXT, FOLLOW_TEXT_in_switchOption135);
            stream_TEXT.add(t);

            // AST REWRITE
            // elements:
            // token labels:
            // rule labels: retval
            // token list labels:
            // rule list labels:
            // wildcard labels:
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval =
                new RewriteRuleSubtreeStream(
                    adaptor, "rule retval", retval != null ? retval.tree : null);

            root_0 = (CommonTree) adaptor.nil();
            // 263:78: ->
            {
              adaptor.addChild(root_0, new SwitchNode(t));
            }

            retval.tree = root_0;
          }
          break;
        case 2:
          // /Users/tom/Projects/netbeans/jet-main/java.j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/vmo/gen/CommandLine.g:264:3: {...}? =>t= TEXT
          {
            if (!((VERBOSE.equals(input.LT(1).getText())
                || input.LT(1).getText().startsWith(VERBOSE + ':')))) {
              throw new FailedPredicateException(
                  input,
                  "switchOption",
                  "VERBOSE.equals(input.LT(1).getText()) || input.LT(1).getText().startsWith(VERBOSE+':')");
            }
            t = (Token) match(input, TEXT, FOLLOW_TEXT_in_switchOption166);
            stream_TEXT.add(t);

            // AST REWRITE
            // elements:
            // token labels:
            // rule labels: retval
            // token list labels:
            // rule list labels:
            // wildcard labels:
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval =
                new RewriteRuleSubtreeStream(
                    adaptor, "rule retval", retval != null ? retval.tree : null);

            root_0 = (CommonTree) adaptor.nil();
            // 264:107: ->
            {
              adaptor.addChild(root_0, new SwitchNode(t));
            }

            retval.tree = root_0;
          }
          break;
        case 3:
          // /Users/tom/Projects/netbeans/jet-main/java.j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/vmo/gen/CommandLine.g:265:3: {...}? =>t= TEXT
          {
            if (!((VERSION.equals(input.LT(1).getText())
                || input.LT(1).getText().startsWith(VERSION + ':')))) {
              throw new FailedPredicateException(
                  input,
                  "switchOption",
                  "VERSION.equals(input.LT(1).getText()) || input.LT(1).getText().startsWith(VERSION+':')");
            }
            t = (Token) match(input, TEXT, FOLLOW_TEXT_in_switchOption186);
            stream_TEXT.add(t);

            index = t.getText().indexOf(':');
            if (index > 0) {
              name = t.getText().substring(0, index);
              value = (index + 1) == t.getText().length() ? "" : t.getText().substring(index + 1);
            } else {
              name = t.getText();
            }

            // AST REWRITE
            // elements:
            // token labels:
            // rule labels: retval
            // token list labels:
            // rule list labels:
            // wildcard labels:
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval =
                new RewriteRuleSubtreeStream(
                    adaptor, "rule retval", retval != null ? retval.tree : null);

            root_0 = (CommonTree) adaptor.nil();
            // 265:304: ->
            {
              adaptor.addChild(
                  root_0,
                  index < 0 ? new SwitchNode(t) : new ParametrizedNode(t, name, ":", value));
            }

            retval.tree = root_0;
          }
          break;
        case 4:
          // /Users/tom/Projects/netbeans/jet-main/java.j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/vmo/gen/CommandLine.g:266:3: {...}? =>t= TEXT
          {
            if (!((input.LT(1).getText().startsWith(XSHARE + ':')))) {
              throw new FailedPredicateException(
                  input, "switchOption", "input.LT(1).getText().startsWith(XSHARE+':')");
            }
            t = (Token) match(input, TEXT, FOLLOW_TEXT_in_switchOption203);
            stream_TEXT.add(t);

            // AST REWRITE
            // elements:
            // token labels:
            // rule labels: retval
            // token list labels:
            // rule list labels:
            // wildcard labels:
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval =
                new RewriteRuleSubtreeStream(
                    adaptor, "rule retval", retval != null ? retval.tree : null);

            root_0 = (CommonTree) adaptor.nil();
            // 266:60: ->
            {
              adaptor.addChild(root_0, new SwitchNode(t));
            }

            retval.tree = root_0;
          }
          break;
        case 5:
          // /Users/tom/Projects/netbeans/jet-main/java.j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/vmo/gen/CommandLine.g:267:3: {...}? =>t= TEXT
          {
            if (!((input.LT(1).getText().startsWith(XCJNI + ':')))) {
              throw new FailedPredicateException(
                  input, "switchOption", "input.LT(1).getText().startsWith(XCJNI+':')");
            }
            t = (Token) match(input, TEXT, FOLLOW_TEXT_in_switchOption218);
            stream_TEXT.add(t);

            // AST REWRITE
            // elements:
            // token labels:
            // rule labels: retval
            // token list labels:
            // rule list labels:
            // wildcard labels:
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval =
                new RewriteRuleSubtreeStream(
                    adaptor, "rule retval", retval != null ? retval.tree : null);

            root_0 = (CommonTree) adaptor.nil();
            // 267:61: ->
            {
              adaptor.addChild(root_0, new SwitchNode(t));
            }

            retval.tree = root_0;
          }
          break;
        case 6:
          // /Users/tom/Projects/netbeans/jet-main/java.j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/vmo/gen/CommandLine.g:268:3: {...}? =>t= TEXT '=' eText
          {
            if (!((input.LT(1).getText().charAt(0) == 'D'))) {
              throw new FailedPredicateException(
                  input, "switchOption", "input.LT(1).getText().charAt(0) == 'D'");
            }
            t = (Token) match(input, TEXT, FOLLOW_TEXT_in_switchOption235);
            stream_TEXT.add(t);

            char_literal7 = (Token) match(input, 8, FOLLOW_8_in_switchOption237);
            stream_8.add(char_literal7);

            pushFollow(FOLLOW_eText_in_switchOption239);
            eText8 = eText();

            state._fsp--;

            stream_eText.add(eText8.getTree());

            // AST REWRITE
            // elements:
            // token labels:
            // rule labels: retval
            // token list labels:
            // rule list labels:
            // wildcard labels:
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval =
                new RewriteRuleSubtreeStream(
                    adaptor, "rule retval", retval != null ? retval.tree : null);

            root_0 = (CommonTree) adaptor.nil();
            // 268:67: ->
            {
              adaptor.addChild(
                  root_0,
                  new UserPropertyNode(
                      t,
                      (eText8 != null ? input.toString(eText8.start, eText8.stop) : null),
                      (t != null ? t.getCharPositionInLine() : 0)));
            }

            retval.tree = root_0;
          }
          break;
        case 7:
          // /Users/tom/Projects/netbeans/jet-main/java.j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/vmo/gen/CommandLine.g:269:3: {...}? =>t= TEXT
          {
            if (!((isParamOption(input.LT(1).getText())))) {
              throw new FailedPredicateException(
                  input, "switchOption", "isParamOption(input.LT(1).getText())");
            }
            t = (Token) match(input, TEXT, FOLLOW_TEXT_in_switchOption257);
            stream_TEXT.add(t);

            index = t.getText().indexOf(':');
            if (index > 0) {
              name = t.getText().substring(0, index);
              value = (index + 1) == t.getText().length() ? "" : t.getText().substring(index + 1);
            }

            // AST REWRITE
            // elements:
            // token labels:
            // rule labels: retval
            // token list labels:
            // rule list labels:
            // wildcard labels:
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval =
                new RewriteRuleSubtreeStream(
                    adaptor, "rule retval", retval != null ? retval.tree : null);

            root_0 = (CommonTree) adaptor.nil();
            // 269:227: ->
            {
              adaptor.addChild(root_0, new ParametrizedNode(t, name, ":", value));
            }

            retval.tree = root_0;
          }
          break;
        case 8:
          // /Users/tom/Projects/netbeans/jet-main/java.j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/vmo/gen/CommandLine.g:270:3: {...}? =>t= TEXT
          {
            if (!((memOptions.matcher(input.LT(1).getText()).matches()))) {
              throw new FailedPredicateException(
                  input, "switchOption", "memOptions.matcher(input.LT(1).getText()).matches()");
            }
            t = (Token) match(input, TEXT, FOLLOW_TEXT_in_switchOption274);
            stream_TEXT.add(t);

            // AST REWRITE
            // elements:
            // token labels:
            // rule labels: retval
            // token list labels:
            // rule list labels:
            // wildcard labels:
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval =
                new RewriteRuleSubtreeStream(
                    adaptor, "rule retval", retval != null ? retval.tree : null);

            root_0 = (CommonTree) adaptor.nil();
            // 270:69: ->
            {
              adaptor.addChild(root_0, new ParametrizedNode(t, 3));
            }

            retval.tree = root_0;
          }
          break;
        case 9:
          // /Users/tom/Projects/netbeans/jet-main/java.j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/vmo/gen/CommandLine.g:271:3: {...}? =>t= TEXT WS eText
          {
            if (!((CLASSPATH.equals(input.LT(1).getText())
                || CLASSPATH_LONG.equals(input.LT(1).getText())))) {
              throw new FailedPredicateException(
                  input,
                  "switchOption",
                  "CLASSPATH.equals(input.LT(1).getText()) || CLASSPATH_LONG.equals(input.LT(1).getText())");
            }
            t = (Token) match(input, TEXT, FOLLOW_TEXT_in_switchOption291);
            stream_TEXT.add(t);

            WS9 = (Token) match(input, WS, FOLLOW_WS_in_switchOption293);
            stream_WS.add(WS9);

            pushFollow(FOLLOW_eText_in_switchOption295);
            eText10 = eText();

            state._fsp--;

            stream_eText.add(eText10.getTree());

            // AST REWRITE
            // elements:
            // token labels:
            // rule labels: retval
            // token list labels:
            // rule list labels:
            // wildcard labels:
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval =
                new RewriteRuleSubtreeStream(
                    adaptor, "rule retval", retval != null ? retval.tree : null);

            root_0 = (CommonTree) adaptor.nil();
            // 271:112: ->
            {
              adaptor.addChild(
                  root_0,
                  new ParametrizedNode(
                      t,
                      " ",
                      (eText10 != null ? input.toString(eText10.start, eText10.stop) : null),
                      false));
            }

            retval.tree = root_0;
          }
          break;
        case 10:
          // /Users/tom/Projects/netbeans/jet-main/java.j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/vmo/gen/CommandLine.g:272:3: t= TEXT
          {
            t = (Token) match(input, TEXT, FOLLOW_TEXT_in_switchOption307);
            stream_TEXT.add(t);

            // AST REWRITE
            // elements:
            // token labels:
            // rule labels: retval
            // token list labels:
            // rule list labels:
            // wildcard labels:
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval =
                new RewriteRuleSubtreeStream(
                    adaptor, "rule retval", retval != null ? retval.tree : null);

            root_0 = (CommonTree) adaptor.nil();
            // 272:10: ->
            {
              adaptor.addChild(root_0, new UnrecognizedOption(t));
            }

            retval.tree = root_0;
          }
          break;
      }
      retval.stop = input.LT(-1);

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

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

    } finally {
    }
    return retval;
  }
  // $ANTLR start "annotation"
  // AnnotationParser.g:72:1: annotation : AT ann_class argument_list -> ^( ANNOTATION ann_class
  // argument_list ) ;
  public final AnnotationParser.annotation_return annotation() throws RecognitionException {
    AnnotationParser.annotation_return retval = new AnnotationParser.annotation_return();
    retval.start = input.LT(1);

    AnnotationCommonTree root_0 = null;

    CommonToken AT1 = null;
    AnnotationParser.ann_class_return ann_class2 = null;

    AnnotationParser.argument_list_return argument_list3 = null;

    AnnotationCommonTree AT1_tree = null;
    RewriteRuleTokenStream stream_AT = new RewriteRuleTokenStream(adaptor, "token AT");
    RewriteRuleSubtreeStream stream_argument_list =
        new RewriteRuleSubtreeStream(adaptor, "rule argument_list");
    RewriteRuleSubtreeStream stream_ann_class =
        new RewriteRuleSubtreeStream(adaptor, "rule ann_class");
    try {
      // AnnotationParser.g:73:3: ( AT ann_class argument_list -> ^( ANNOTATION ann_class
      // argument_list ) )
      // AnnotationParser.g:73:5: AT ann_class argument_list
      {
        AT1 = (CommonToken) match(input, AT, FOLLOW_AT_in_annotation90);
        stream_AT.add(AT1);

        pushFollow(FOLLOW_ann_class_in_annotation92);
        ann_class2 = ann_class();

        state._fsp--;

        stream_ann_class.add(ann_class2.getTree());
        pushFollow(FOLLOW_argument_list_in_annotation94);
        argument_list3 = argument_list();

        state._fsp--;

        stream_argument_list.add(argument_list3.getTree());

        // AST REWRITE
        // elements: argument_list, ann_class
        // token labels:
        // rule labels: retval
        // token list labels:
        // rule list labels:
        // wildcard labels:
        retval.tree = root_0;
        RewriteRuleSubtreeStream stream_retval =
            new RewriteRuleSubtreeStream(
                adaptor, "rule retval", retval != null ? retval.tree : null);

        root_0 = (AnnotationCommonTree) adaptor.nil();
        // 74:5: -> ^( ANNOTATION ann_class argument_list )
        {
          // AnnotationParser.g:74:7: ^( ANNOTATION ann_class argument_list )
          {
            AnnotationCommonTree root_1 = (AnnotationCommonTree) adaptor.nil();
            root_1 =
                (AnnotationCommonTree)
                    adaptor.becomeRoot(
                        (AnnotationCommonTree) adaptor.create(ANNOTATION, "ANNOTATION"), root_1);

            adaptor.addChild(root_1, stream_ann_class.nextTree());
            adaptor.addChild(root_1, stream_argument_list.nextTree());

            adaptor.addChild(root_0, root_1);
          }
        }

        retval.tree = root_0;
      }

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

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

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

    } finally {
    }
    return retval;
  }
  // $ANTLR start "rhtype"
  // AnnotationParser.g:129:1: rhtype : (param= STRING -> ^( RHTYPE $param) | param= STRING_LITERAL
  // -> ^( RHTYPE $param) | json );
  public final AnnotationParser.rhtype_return rhtype() throws RecognitionException {
    AnnotationParser.rhtype_return retval = new AnnotationParser.rhtype_return();
    retval.start = input.LT(1);

    AnnotationCommonTree root_0 = null;

    CommonToken param = null;
    AnnotationParser.json_return json27 = null;

    AnnotationCommonTree param_tree = null;
    RewriteRuleTokenStream stream_STRING_LITERAL =
        new RewriteRuleTokenStream(adaptor, "token STRING_LITERAL");
    RewriteRuleTokenStream stream_STRING = new RewriteRuleTokenStream(adaptor, "token STRING");

    try {
      // AnnotationParser.g:130:3: (param= STRING -> ^( RHTYPE $param) | param= STRING_LITERAL -> ^(
      // RHTYPE $param) | json )
      int alt8 = 3;
      switch (input.LA(1)) {
        case STRING:
          {
            alt8 = 1;
          }
          break;
        case STRING_LITERAL:
          {
            alt8 = 2;
          }
          break;
        case JSON_START:
          {
            alt8 = 3;
          }
          break;
        default:
          NoViableAltException nvae = new NoViableAltException("", 8, 0, input);

          throw nvae;
      }

      switch (alt8) {
        case 1:
          // AnnotationParser.g:130:5: param= STRING
          {
            param = (CommonToken) match(input, STRING, FOLLOW_STRING_in_rhtype411);
            stream_STRING.add(param);

            // AST REWRITE
            // elements: param
            // token labels: param
            // rule labels: retval
            // token list labels:
            // rule list labels:
            // wildcard labels:
            retval.tree = root_0;
            RewriteRuleTokenStream stream_param =
                new RewriteRuleTokenStream(adaptor, "token param", param);
            RewriteRuleSubtreeStream stream_retval =
                new RewriteRuleSubtreeStream(
                    adaptor, "rule retval", retval != null ? retval.tree : null);

            root_0 = (AnnotationCommonTree) adaptor.nil();
            // 131:5: -> ^( RHTYPE $param)
            {
              // AnnotationParser.g:131:8: ^( RHTYPE $param)
              {
                AnnotationCommonTree root_1 = (AnnotationCommonTree) adaptor.nil();
                root_1 =
                    (AnnotationCommonTree)
                        adaptor.becomeRoot(
                            (AnnotationCommonTree) adaptor.create(RHTYPE, "RHTYPE"), root_1);

                adaptor.addChild(root_1, stream_param.nextNode());

                adaptor.addChild(root_0, root_1);
              }
            }

            retval.tree = root_0;
          }
          break;
        case 2:
          // AnnotationParser.g:132:5: param= STRING_LITERAL
          {
            param = (CommonToken) match(input, STRING_LITERAL, FOLLOW_STRING_LITERAL_in_rhtype432);
            stream_STRING_LITERAL.add(param);

            // AST REWRITE
            // elements: param
            // token labels: param
            // rule labels: retval
            // token list labels:
            // rule list labels:
            // wildcard labels:
            retval.tree = root_0;
            RewriteRuleTokenStream stream_param =
                new RewriteRuleTokenStream(adaptor, "token param", param);
            RewriteRuleSubtreeStream stream_retval =
                new RewriteRuleSubtreeStream(
                    adaptor, "rule retval", retval != null ? retval.tree : null);

            root_0 = (AnnotationCommonTree) adaptor.nil();
            // 133:5: -> ^( RHTYPE $param)
            {
              // AnnotationParser.g:133:8: ^( RHTYPE $param)
              {
                AnnotationCommonTree root_1 = (AnnotationCommonTree) adaptor.nil();
                root_1 =
                    (AnnotationCommonTree)
                        adaptor.becomeRoot(
                            (AnnotationCommonTree) adaptor.create(RHTYPE, "RHTYPE"), root_1);

                adaptor.addChild(root_1, stream_param.nextNode());

                adaptor.addChild(root_0, root_1);
              }
            }

            retval.tree = root_0;
          }
          break;
        case 3:
          // AnnotationParser.g:134:5: json
          {
            root_0 = (AnnotationCommonTree) adaptor.nil();

            pushFollow(FOLLOW_json_in_rhtype451);
            json27 = json();

            state._fsp--;

            adaptor.addChild(root_0, json27.getTree());
          }
          break;
      }
      retval.stop = input.LT(-1);

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

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

    } finally {
    }
    return retval;
  }
Exemplo n.º 16
0
  // $ANTLR start "literal"
  // /home/jon/flume/src/antlr/FlumeShell.g:93:1: literal : ( DQuoteLiteral -> ^( DQUOTE
  // DQuoteLiteral ) | SQuoteLiteral -> ^( SQUOTE SQuoteLiteral ) | Argument -> ^( STRING Argument )
  // );
  public final FlumeShellParser.literal_return literal() throws RecognitionException {
    FlumeShellParser.literal_return retval = new FlumeShellParser.literal_return();
    retval.start = input.LT(1);

    Object root_0 = null;

    Token DQuoteLiteral8 = null;
    Token SQuoteLiteral9 = null;
    Token Argument10 = null;

    Object DQuoteLiteral8_tree = null;
    Object SQuoteLiteral9_tree = null;
    Object Argument10_tree = null;
    RewriteRuleTokenStream stream_Argument = new RewriteRuleTokenStream(adaptor, "token Argument");
    RewriteRuleTokenStream stream_DQuoteLiteral =
        new RewriteRuleTokenStream(adaptor, "token DQuoteLiteral");
    RewriteRuleTokenStream stream_SQuoteLiteral =
        new RewriteRuleTokenStream(adaptor, "token SQuoteLiteral");

    try {
      // /home/jon/flume/src/antlr/FlumeShell.g:94:5: ( DQuoteLiteral -> ^( DQUOTE DQuoteLiteral ) |
      // SQuoteLiteral -> ^( SQUOTE SQuoteLiteral ) | Argument -> ^( STRING Argument ) )
      int alt3 = 3;
      switch (input.LA(1)) {
        case DQuoteLiteral:
          {
            alt3 = 1;
          }
          break;
        case SQuoteLiteral:
          {
            alt3 = 2;
          }
          break;
        case Argument:
          {
            alt3 = 3;
          }
          break;
        default:
          NoViableAltException nvae = new NoViableAltException("", 3, 0, input);

          throw nvae;
      }

      switch (alt3) {
        case 1:
          // /home/jon/flume/src/antlr/FlumeShell.g:94:9: DQuoteLiteral
          {
            DQuoteLiteral8 =
                (Token) match(input, DQuoteLiteral, FOLLOW_DQuoteLiteral_in_literal150);
            stream_DQuoteLiteral.add(DQuoteLiteral8);

            // AST REWRITE
            // elements: DQuoteLiteral
            // token labels:
            // rule labels: retval
            // token list labels:
            // rule list labels:
            // wildcard labels:
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval =
                new RewriteRuleSubtreeStream(
                    adaptor, "rule retval", retval != null ? retval.tree : null);

            root_0 = (Object) adaptor.nil();
            // 94:23: -> ^( DQUOTE DQuoteLiteral )
            {
              // /home/jon/flume/src/antlr/FlumeShell.g:94:26: ^( DQUOTE DQuoteLiteral )
              {
                Object root_1 = (Object) adaptor.nil();
                root_1 =
                    (Object) adaptor.becomeRoot((Object) adaptor.create(DQUOTE, "DQUOTE"), root_1);

                adaptor.addChild(root_1, stream_DQuoteLiteral.nextNode());

                adaptor.addChild(root_0, root_1);
              }
            }

            retval.tree = root_0;
          }
          break;
        case 2:
          // /home/jon/flume/src/antlr/FlumeShell.g:95:9: SQuoteLiteral
          {
            SQuoteLiteral9 =
                (Token) match(input, SQuoteLiteral, FOLLOW_SQuoteLiteral_in_literal170);
            stream_SQuoteLiteral.add(SQuoteLiteral9);

            // AST REWRITE
            // elements: SQuoteLiteral
            // token labels:
            // rule labels: retval
            // token list labels:
            // rule list labels:
            // wildcard labels:
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval =
                new RewriteRuleSubtreeStream(
                    adaptor, "rule retval", retval != null ? retval.tree : null);

            root_0 = (Object) adaptor.nil();
            // 95:23: -> ^( SQUOTE SQuoteLiteral )
            {
              // /home/jon/flume/src/antlr/FlumeShell.g:95:26: ^( SQUOTE SQuoteLiteral )
              {
                Object root_1 = (Object) adaptor.nil();
                root_1 =
                    (Object) adaptor.becomeRoot((Object) adaptor.create(SQUOTE, "SQUOTE"), root_1);

                adaptor.addChild(root_1, stream_SQuoteLiteral.nextNode());

                adaptor.addChild(root_0, root_1);
              }
            }

            retval.tree = root_0;
          }
          break;
        case 3:
          // /home/jon/flume/src/antlr/FlumeShell.g:96:9: Argument
          {
            Argument10 = (Token) match(input, Argument, FOLLOW_Argument_in_literal188);
            stream_Argument.add(Argument10);

            // AST REWRITE
            // elements: Argument
            // token labels:
            // rule labels: retval
            // token list labels:
            // rule list labels:
            // wildcard labels:
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval =
                new RewriteRuleSubtreeStream(
                    adaptor, "rule retval", retval != null ? retval.tree : null);

            root_0 = (Object) adaptor.nil();
            // 96:21: -> ^( STRING Argument )
            {
              // /home/jon/flume/src/antlr/FlumeShell.g:96:24: ^( STRING Argument )
              {
                Object root_1 = (Object) adaptor.nil();
                root_1 =
                    (Object) adaptor.becomeRoot((Object) adaptor.create(STRING, "STRING"), root_1);

                adaptor.addChild(root_1, stream_Argument.nextNode());

                adaptor.addChild(root_0, root_1);
              }
            }

            retval.tree = root_0;
          }
          break;
      }
      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 "json_arguments"
  // AnnotationParser.g:121:1: json_arguments : json_argument ( COMMA ( json_argument ) )* ;
  public final AnnotationParser.json_arguments_return json_arguments() throws RecognitionException {
    AnnotationParser.json_arguments_return retval = new AnnotationParser.json_arguments_return();
    retval.start = input.LT(1);

    AnnotationCommonTree root_0 = null;

    CommonToken COMMA22 = null;
    AnnotationParser.json_argument_return json_argument21 = null;

    AnnotationParser.json_argument_return json_argument23 = null;

    AnnotationCommonTree COMMA22_tree = null;

    try {
      // AnnotationParser.g:122:3: ( json_argument ( COMMA ( json_argument ) )* )
      // AnnotationParser.g:122:5: json_argument ( COMMA ( json_argument ) )*
      {
        root_0 = (AnnotationCommonTree) adaptor.nil();

        pushFollow(FOLLOW_json_argument_in_json_arguments362);
        json_argument21 = json_argument();

        state._fsp--;

        adaptor.addChild(root_0, json_argument21.getTree());
        // AnnotationParser.g:122:19: ( COMMA ( json_argument ) )*
        loop7:
        do {
          int alt7 = 2;
          int LA7_0 = input.LA(1);

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

          switch (alt7) {
            case 1:
              // AnnotationParser.g:122:20: COMMA ( json_argument )
              {
                COMMA22 = (CommonToken) match(input, COMMA, FOLLOW_COMMA_in_json_arguments365);
                COMMA22_tree = (AnnotationCommonTree) adaptor.create(COMMA22);
                adaptor.addChild(root_0, COMMA22_tree);

                // AnnotationParser.g:122:26: ( json_argument )
                // AnnotationParser.g:122:27: json_argument
                {
                  pushFollow(FOLLOW_json_argument_in_json_arguments368);
                  json_argument23 = json_argument();

                  state._fsp--;

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

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

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

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

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

    } finally {
    }
    return retval;
  }
  // $ANTLR start "json"
  // AnnotationParser.g:117:1: json : JSON_START ( json_arguments )? JSON_END ;
  public final AnnotationParser.json_return json() throws RecognitionException {
    AnnotationParser.json_return retval = new AnnotationParser.json_return();
    retval.start = input.LT(1);

    AnnotationCommonTree root_0 = null;

    CommonToken JSON_START18 = null;
    CommonToken JSON_END20 = null;
    AnnotationParser.json_arguments_return json_arguments19 = null;

    AnnotationCommonTree JSON_START18_tree = null;
    AnnotationCommonTree JSON_END20_tree = null;

    try {
      // AnnotationParser.g:118:3: ( JSON_START ( json_arguments )? JSON_END )
      // AnnotationParser.g:118:5: JSON_START ( json_arguments )? JSON_END
      {
        root_0 = (AnnotationCommonTree) adaptor.nil();

        JSON_START18 = (CommonToken) match(input, JSON_START, FOLLOW_JSON_START_in_json342);
        JSON_START18_tree = (AnnotationCommonTree) adaptor.create(JSON_START18);
        adaptor.addChild(root_0, JSON_START18_tree);

        // AnnotationParser.g:118:16: ( json_arguments )?
        int alt6 = 2;
        int LA6_0 = input.LA(1);

        if ((LA6_0 == STRING_LITERAL)) {
          alt6 = 1;
        }
        switch (alt6) {
          case 1:
            // AnnotationParser.g:118:16: json_arguments
            {
              pushFollow(FOLLOW_json_arguments_in_json344);
              json_arguments19 = json_arguments();

              state._fsp--;

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

        JSON_END20 = (CommonToken) match(input, JSON_END, FOLLOW_JSON_END_in_json347);
        JSON_END20_tree = (AnnotationCommonTree) adaptor.create(JSON_END20);
        adaptor.addChild(root_0, JSON_END20_tree);
      }

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

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

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

    } finally {
    }
    return retval;
  }
Exemplo n.º 19
0
  // $ANTLR start "option"
  // /Users/tom/Projects/netbeans/jet-main/java.j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/vmo/gen/CommandLine.g:254:1: option : ( '-' switchOption -> switchOption | nonSwitchOption -> nonSwitchOption );
  public final CommandLineParser.option_return option() throws RecognitionException {
    CommandLineParser.option_return retval = new CommandLineParser.option_return();
    retval.start = input.LT(1);

    CommonTree root_0 = null;

    Token char_literal4 = null;
    CommandLineParser.switchOption_return switchOption5 = null;

    CommandLineParser.nonSwitchOption_return nonSwitchOption6 = null;

    CommonTree char_literal4_tree = null;
    RewriteRuleTokenStream stream_7 = new RewriteRuleTokenStream(adaptor, "token 7");
    RewriteRuleSubtreeStream stream_switchOption =
        new RewriteRuleSubtreeStream(adaptor, "rule switchOption");
    RewriteRuleSubtreeStream stream_nonSwitchOption =
        new RewriteRuleSubtreeStream(adaptor, "rule nonSwitchOption");
    try {
      // /Users/tom/Projects/netbeans/jet-main/java.j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/vmo/gen/CommandLine.g:254:8: ( '-' switchOption -> switchOption | nonSwitchOption -> nonSwitchOption )
      int alt4 = 2;
      int LA4_0 = input.LA(1);

      if ((LA4_0 == 7)) {
        alt4 = 1;
      } else if ((LA4_0 == TEXT)) {
        alt4 = 2;
      } else {
        NoViableAltException nvae = new NoViableAltException("", 4, 0, input);

        throw nvae;
      }
      switch (alt4) {
        case 1:
          // /Users/tom/Projects/netbeans/jet-main/java.j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/vmo/gen/CommandLine.g:254:10: '-' switchOption
          {
            char_literal4 = (Token) match(input, 7, FOLLOW_7_in_option95);
            stream_7.add(char_literal4);

            pushFollow(FOLLOW_switchOption_in_option97);
            switchOption5 = switchOption();

            state._fsp--;

            stream_switchOption.add(switchOption5.getTree());

            // AST REWRITE
            // elements: switchOption
            // token labels:
            // rule labels: retval
            // token list labels:
            // rule list labels:
            // wildcard labels:
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval =
                new RewriteRuleSubtreeStream(
                    adaptor, "rule retval", retval != null ? retval.tree : null);

            root_0 = (CommonTree) adaptor.nil();
            // 254:27: -> switchOption
            {
              adaptor.addChild(root_0, stream_switchOption.nextTree());
            }

            retval.tree = root_0;
          }
          break;
        case 2:
          // /Users/tom/Projects/netbeans/jet-main/java.j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/vmo/gen/CommandLine.g:255:3: nonSwitchOption
          {
            pushFollow(FOLLOW_nonSwitchOption_in_option107);
            nonSwitchOption6 = nonSwitchOption();

            state._fsp--;

            stream_nonSwitchOption.add(nonSwitchOption6.getTree());

            // AST REWRITE
            // elements: nonSwitchOption
            // token labels:
            // rule labels: retval
            // token list labels:
            // rule list labels:
            // wildcard labels:
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval =
                new RewriteRuleSubtreeStream(
                    adaptor, "rule retval", retval != null ? retval.tree : null);

            root_0 = (CommonTree) adaptor.nil();
            // 255:20: -> nonSwitchOption
            {
              adaptor.addChild(root_0, stream_nonSwitchOption.nextTree());
            }

            retval.tree = root_0;
          }
          break;
      }
      retval.stop = input.LT(-1);

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

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

    } finally {
    }
    return retval;
  }
  // $ANTLR start "ann_class"
  // AnnotationParser.g:83:1: ann_class : ( namespace )* classname ;
  public final AnnotationParser.ann_class_return ann_class() throws RecognitionException {
    AnnotationParser.ann_class_return retval = new AnnotationParser.ann_class_return();
    retval.start = input.LT(1);

    AnnotationCommonTree root_0 = null;

    AnnotationParser.namespace_return namespace7 = null;

    AnnotationParser.classname_return classname8 = null;

    try {
      // AnnotationParser.g:84:3: ( ( namespace )* classname )
      // AnnotationParser.g:84:5: ( namespace )* classname
      {
        root_0 = (AnnotationCommonTree) adaptor.nil();

        // AnnotationParser.g:84:5: ( namespace )*
        loop3:
        do {
          int alt3 = 2;
          int LA3_0 = input.LA(1);

          if ((LA3_0 == STRING)) {
            int LA3_1 = input.LA(2);

            if ((LA3_1 == BSLASH)) {
              alt3 = 1;
            }
          }

          switch (alt3) {
            case 1:
              // AnnotationParser.g:84:5: namespace
              {
                pushFollow(FOLLOW_namespace_in_ann_class155);
                namespace7 = namespace();

                state._fsp--;

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

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

        pushFollow(FOLLOW_classname_in_ann_class158);
        classname8 = classname();

        state._fsp--;

        adaptor.addChild(root_0, classname8.getTree());
      }

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

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

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

    } finally {
    }
    return retval;
  }
Exemplo n.º 21
0
  // $ANTLR start "eText"
  // /Users/tom/Projects/netbeans/jet-main/java.j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/vmo/gen/CommandLine.g:274:1: eText : ( '\\'' TEXT '\\'' | '\"' TEXT '\"' | TEXT );
  public final CommandLineParser.eText_return eText() throws RecognitionException {
    CommandLineParser.eText_return retval = new CommandLineParser.eText_return();
    retval.start = input.LT(1);

    CommonTree root_0 = null;

    Token char_literal11 = null;
    Token TEXT12 = null;
    Token char_literal13 = null;
    Token char_literal14 = null;
    Token TEXT15 = null;
    Token char_literal16 = null;
    Token TEXT17 = null;

    CommonTree char_literal11_tree = null;
    CommonTree TEXT12_tree = null;
    CommonTree char_literal13_tree = null;
    CommonTree char_literal14_tree = null;
    CommonTree TEXT15_tree = null;
    CommonTree char_literal16_tree = null;
    CommonTree TEXT17_tree = null;

    try {
      // /Users/tom/Projects/netbeans/jet-main/java.j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/vmo/gen/CommandLine.g:274:7: ( '\\'' TEXT '\\'' | '\"' TEXT '\"' | TEXT )
      int alt6 = 3;
      switch (input.LA(1)) {
        case 9:
          {
            alt6 = 1;
          }
          break;
        case 10:
          {
            alt6 = 2;
          }
          break;
        case TEXT:
          {
            alt6 = 3;
          }
          break;
        default:
          NoViableAltException nvae = new NoViableAltException("", 6, 0, input);

          throw nvae;
      }

      switch (alt6) {
        case 1:
          // /Users/tom/Projects/netbeans/jet-main/java.j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/vmo/gen/CommandLine.g:275:3: '\\'' TEXT '\\''
          {
            root_0 = (CommonTree) adaptor.nil();

            char_literal11 = (Token) match(input, 9, FOLLOW_9_in_eText324);
            char_literal11_tree = (CommonTree) adaptor.create(char_literal11);
            adaptor.addChild(root_0, char_literal11_tree);

            TEXT12 = (Token) match(input, TEXT, FOLLOW_TEXT_in_eText326);
            TEXT12_tree = (CommonTree) adaptor.create(TEXT12);
            adaptor.addChild(root_0, TEXT12_tree);

            char_literal13 = (Token) match(input, 9, FOLLOW_9_in_eText328);
            char_literal13_tree = (CommonTree) adaptor.create(char_literal13);
            adaptor.addChild(root_0, char_literal13_tree);
          }
          break;
        case 2:
          // /Users/tom/Projects/netbeans/jet-main/java.j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/vmo/gen/CommandLine.g:276:4: '\"' TEXT '\"'
          {
            root_0 = (CommonTree) adaptor.nil();

            char_literal14 = (Token) match(input, 10, FOLLOW_10_in_eText333);
            char_literal14_tree = (CommonTree) adaptor.create(char_literal14);
            adaptor.addChild(root_0, char_literal14_tree);

            TEXT15 = (Token) match(input, TEXT, FOLLOW_TEXT_in_eText335);
            TEXT15_tree = (CommonTree) adaptor.create(TEXT15);
            adaptor.addChild(root_0, TEXT15_tree);

            char_literal16 = (Token) match(input, 10, FOLLOW_10_in_eText338);
            char_literal16_tree = (CommonTree) adaptor.create(char_literal16);
            adaptor.addChild(root_0, char_literal16_tree);
          }
          break;
        case 3:
          // /Users/tom/Projects/netbeans/jet-main/java.j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/vmo/gen/CommandLine.g:277:8: TEXT
          {
            root_0 = (CommonTree) adaptor.nil();

            TEXT17 = (Token) match(input, TEXT, FOLLOW_TEXT_in_eText347);
            TEXT17_tree = (CommonTree) adaptor.create(TEXT17);
            adaptor.addChild(root_0, TEXT17_tree);
          }
          break;
      }
      retval.stop = input.LT(-1);

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

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

    } finally {
    }
    return retval;
  }
  // $ANTLR start "namespace"
  // AnnotationParser.g:87:1: namespace : ns= STRING BSLASH -> ^( NSPART $ns) ;
  public final AnnotationParser.namespace_return namespace() throws RecognitionException {
    AnnotationParser.namespace_return retval = new AnnotationParser.namespace_return();
    retval.start = input.LT(1);

    AnnotationCommonTree root_0 = null;

    CommonToken ns = null;
    CommonToken BSLASH9 = null;

    AnnotationCommonTree ns_tree = null;
    AnnotationCommonTree BSLASH9_tree = null;
    RewriteRuleTokenStream stream_BSLASH = new RewriteRuleTokenStream(adaptor, "token BSLASH");
    RewriteRuleTokenStream stream_STRING = new RewriteRuleTokenStream(adaptor, "token STRING");

    try {
      // AnnotationParser.g:88:3: (ns= STRING BSLASH -> ^( NSPART $ns) )
      // AnnotationParser.g:88:5: ns= STRING BSLASH
      {
        ns = (CommonToken) match(input, STRING, FOLLOW_STRING_in_namespace175);
        stream_STRING.add(ns);

        BSLASH9 = (CommonToken) match(input, BSLASH, FOLLOW_BSLASH_in_namespace177);
        stream_BSLASH.add(BSLASH9);

        // AST REWRITE
        // elements: ns
        // token labels: ns
        // rule labels: retval
        // token list labels:
        // rule list labels:
        // wildcard labels:
        retval.tree = root_0;
        RewriteRuleTokenStream stream_ns = new RewriteRuleTokenStream(adaptor, "token ns", ns);
        RewriteRuleSubtreeStream stream_retval =
            new RewriteRuleSubtreeStream(
                adaptor, "rule retval", retval != null ? retval.tree : null);

        root_0 = (AnnotationCommonTree) adaptor.nil();
        // 89:4: -> ^( NSPART $ns)
        {
          // AnnotationParser.g:89:6: ^( NSPART $ns)
          {
            AnnotationCommonTree root_1 = (AnnotationCommonTree) adaptor.nil();
            root_1 =
                (AnnotationCommonTree)
                    adaptor.becomeRoot(
                        (AnnotationCommonTree) adaptor.create(NSPART, "NSPART"), root_1);

            adaptor.addChild(root_1, stream_ns.nextNode());

            adaptor.addChild(root_0, root_1);
          }
        }

        retval.tree = root_0;
      }

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

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

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

    } finally {
    }
    return retval;
  }
Exemplo n.º 23
0
  // $ANTLR start "orexpression"
  // com/pmerienne/eventmonitoring/shared/parser/Criteria.g:75:1: orexpression : logicalexpression (
  // OR logicalexpression )* ;
  public final CriteriaParser.orexpression_return orexpression() throws RecognitionException {
    CriteriaParser.orexpression_return retval = new CriteriaParser.orexpression_return();
    retval.start = input.LT(1);

    Object root_0 = null;

    Token OR6 = null;
    CriteriaParser.logicalexpression_return logicalexpression5 = null;

    CriteriaParser.logicalexpression_return logicalexpression7 = null;

    Object OR6_tree = null;

    try {
      // com/pmerienne/eventmonitoring/shared/parser/Criteria.g:75:14: ( logicalexpression ( OR
      // logicalexpression )* )
      // com/pmerienne/eventmonitoring/shared/parser/Criteria.g:75:16: logicalexpression ( OR
      // logicalexpression )*
      {
        root_0 = (Object) adaptor.nil();

        pushFollow(FOLLOW_logicalexpression_in_orexpression406);
        logicalexpression5 = logicalexpression();

        state._fsp--;

        adaptor.addChild(root_0, logicalexpression5.getTree());
        // com/pmerienne/eventmonitoring/shared/parser/Criteria.g:75:34: ( OR logicalexpression )*
        loop2:
        do {
          int alt2 = 2;
          switch (input.LA(1)) {
            case OR:
              {
                alt2 = 1;
              }
              break;
          }

          switch (alt2) {
            case 1:
              // com/pmerienne/eventmonitoring/shared/parser/Criteria.g:75:35: OR logicalexpression
              {
                OR6 = (Token) match(input, OR, FOLLOW_OR_in_orexpression409);
                OR6_tree = (Object) adaptor.create(OR6);
                root_0 = (Object) adaptor.becomeRoot(OR6_tree, root_0);

                pushFollow(FOLLOW_logicalexpression_in_orexpression412);
                logicalexpression7 = logicalexpression();

                state._fsp--;

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

            default:
              break loop2;
          }
        } 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 "classname"
  // AnnotationParser.g:92:1: classname : cn= STRING -> ^( CLASSNAME $cn) ;
  public final AnnotationParser.classname_return classname() throws RecognitionException {
    AnnotationParser.classname_return retval = new AnnotationParser.classname_return();
    retval.start = input.LT(1);

    AnnotationCommonTree root_0 = null;

    CommonToken cn = null;

    AnnotationCommonTree cn_tree = null;
    RewriteRuleTokenStream stream_STRING = new RewriteRuleTokenStream(adaptor, "token STRING");

    try {
      // AnnotationParser.g:93:3: (cn= STRING -> ^( CLASSNAME $cn) )
      // AnnotationParser.g:93:5: cn= STRING
      {
        cn = (CommonToken) match(input, STRING, FOLLOW_STRING_in_classname205);
        stream_STRING.add(cn);

        // AST REWRITE
        // elements: cn
        // token labels: cn
        // rule labels: retval
        // token list labels:
        // rule list labels:
        // wildcard labels:
        retval.tree = root_0;
        RewriteRuleTokenStream stream_cn = new RewriteRuleTokenStream(adaptor, "token cn", cn);
        RewriteRuleSubtreeStream stream_retval =
            new RewriteRuleSubtreeStream(
                adaptor, "rule retval", retval != null ? retval.tree : null);

        root_0 = (AnnotationCommonTree) adaptor.nil();
        // 94:5: -> ^( CLASSNAME $cn)
        {
          // AnnotationParser.g:94:7: ^( CLASSNAME $cn)
          {
            AnnotationCommonTree root_1 = (AnnotationCommonTree) adaptor.nil();
            root_1 =
                (AnnotationCommonTree)
                    adaptor.becomeRoot(
                        (AnnotationCommonTree) adaptor.create(CLASSNAME, "CLASSNAME"), root_1);

            adaptor.addChild(root_1, stream_cn.nextNode());

            adaptor.addChild(root_0, root_1);
          }
        }

        retval.tree = root_0;
      }

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

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

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

    } finally {
    }
    return retval;
  }
Exemplo n.º 25
0
  // $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 "arguments"
  // AnnotationParser.g:97:1: arguments : argument ( COMMA arguments )? -> argument ( arguments )? ;
  public final AnnotationParser.arguments_return arguments() throws RecognitionException {
    AnnotationParser.arguments_return retval = new AnnotationParser.arguments_return();
    retval.start = input.LT(1);

    AnnotationCommonTree root_0 = null;

    CommonToken COMMA11 = null;
    AnnotationParser.argument_return argument10 = null;

    AnnotationParser.arguments_return arguments12 = null;

    AnnotationCommonTree COMMA11_tree = null;
    RewriteRuleTokenStream stream_COMMA = new RewriteRuleTokenStream(adaptor, "token COMMA");
    RewriteRuleSubtreeStream stream_argument =
        new RewriteRuleSubtreeStream(adaptor, "rule argument");
    RewriteRuleSubtreeStream stream_arguments =
        new RewriteRuleSubtreeStream(adaptor, "rule arguments");
    try {
      // AnnotationParser.g:98:3: ( argument ( COMMA arguments )? -> argument ( arguments )? )
      // AnnotationParser.g:98:5: argument ( COMMA arguments )?
      {
        pushFollow(FOLLOW_argument_in_arguments230);
        argument10 = argument();

        state._fsp--;

        stream_argument.add(argument10.getTree());
        // AnnotationParser.g:98:15: ( COMMA arguments )?
        int alt4 = 2;
        int LA4_0 = input.LA(1);

        if ((LA4_0 == COMMA)) {
          alt4 = 1;
        }
        switch (alt4) {
          case 1:
            // AnnotationParser.g:98:16: COMMA arguments
            {
              COMMA11 = (CommonToken) match(input, COMMA, FOLLOW_COMMA_in_arguments234);
              stream_COMMA.add(COMMA11);

              pushFollow(FOLLOW_arguments_in_arguments236);
              arguments12 = arguments();

              state._fsp--;

              stream_arguments.add(arguments12.getTree());
            }
            break;
        }

        // AST REWRITE
        // elements: arguments, argument
        // token labels:
        // rule labels: retval
        // token list labels:
        // rule list labels:
        // wildcard labels:
        retval.tree = root_0;
        RewriteRuleSubtreeStream stream_retval =
            new RewriteRuleSubtreeStream(
                adaptor, "rule retval", retval != null ? retval.tree : null);

        root_0 = (AnnotationCommonTree) adaptor.nil();
        // 99:5: -> argument ( arguments )?
        {
          adaptor.addChild(root_0, stream_argument.nextTree());
          // AnnotationParser.g:99:17: ( arguments )?
          if (stream_arguments.hasNext()) {
            adaptor.addChild(root_0, stream_arguments.nextTree());
          }
          stream_arguments.reset();
        }

        retval.tree = root_0;
      }

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

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

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

    } finally {
    }
    return retval;
  }
  // $ANTLR start "argument"
  // AnnotationParser.g:102:1: argument : ( literal_argument | named_argument | json );
  public final AnnotationParser.argument_return argument() throws RecognitionException {
    AnnotationParser.argument_return retval = new AnnotationParser.argument_return();
    retval.start = input.LT(1);

    AnnotationCommonTree root_0 = null;

    AnnotationParser.literal_argument_return literal_argument13 = null;

    AnnotationParser.named_argument_return named_argument14 = null;

    AnnotationParser.json_return json15 = null;

    try {
      // AnnotationParser.g:103:1: ( literal_argument | named_argument | json )
      int alt5 = 3;
      switch (input.LA(1)) {
        case STRING_LITERAL:
          {
            alt5 = 1;
          }
          break;
        case STRING:
          {
            alt5 = 2;
          }
          break;
        case JSON_START:
          {
            alt5 = 3;
          }
          break;
        default:
          NoViableAltException nvae = new NoViableAltException("", 5, 0, input);

          throw nvae;
      }

      switch (alt5) {
        case 1:
          // AnnotationParser.g:103:3: literal_argument
          {
            root_0 = (AnnotationCommonTree) adaptor.nil();

            pushFollow(FOLLOW_literal_argument_in_argument260);
            literal_argument13 = literal_argument();

            state._fsp--;

            adaptor.addChild(root_0, literal_argument13.getTree());
          }
          break;
        case 2:
          // AnnotationParser.g:103:22: named_argument
          {
            root_0 = (AnnotationCommonTree) adaptor.nil();

            pushFollow(FOLLOW_named_argument_in_argument264);
            named_argument14 = named_argument();

            state._fsp--;

            adaptor.addChild(root_0, named_argument14.getTree());
          }
          break;
        case 3:
          // AnnotationParser.g:103:39: json
          {
            root_0 = (AnnotationCommonTree) adaptor.nil();

            pushFollow(FOLLOW_json_in_argument268);
            json15 = json();

            state._fsp--;

            adaptor.addChild(root_0, json15.getTree());
          }
          break;
      }
      retval.stop = input.LT(-1);

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

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

    } finally {
    }
    return retval;
  }
Exemplo n.º 28
0
  // $ANTLR start "lines"
  // /home/jon/flume/src/antlr/FlumeShell.g:86:1: lines : command ( ';' command )* EOF -> ( command
  // )+ ;
  public final FlumeShellParser.lines_return lines() throws RecognitionException {
    FlumeShellParser.lines_return retval = new FlumeShellParser.lines_return();
    retval.start = input.LT(1);

    Object root_0 = null;

    Token char_literal2 = null;
    Token EOF4 = null;
    FlumeShellParser.command_return command1 = null;

    FlumeShellParser.command_return command3 = null;

    Object char_literal2_tree = null;
    Object EOF4_tree = null;
    RewriteRuleTokenStream stream_19 = new RewriteRuleTokenStream(adaptor, "token 19");
    RewriteRuleTokenStream stream_EOF = new RewriteRuleTokenStream(adaptor, "token EOF");
    RewriteRuleSubtreeStream stream_command = new RewriteRuleSubtreeStream(adaptor, "rule command");
    try {
      // /home/jon/flume/src/antlr/FlumeShell.g:86:7: ( command ( ';' command )* EOF -> ( command )+
      // )
      // /home/jon/flume/src/antlr/FlumeShell.g:86:9: command ( ';' command )* EOF
      {
        pushFollow(FOLLOW_command_in_lines85);
        command1 = command();

        state._fsp--;

        stream_command.add(command1.getTree());
        // /home/jon/flume/src/antlr/FlumeShell.g:86:17: ( ';' command )*
        loop1:
        do {
          int alt1 = 2;
          int LA1_0 = input.LA(1);

          if ((LA1_0 == 19)) {
            alt1 = 1;
          }

          switch (alt1) {
            case 1:
              // /home/jon/flume/src/antlr/FlumeShell.g:86:18: ';' command
              {
                char_literal2 = (Token) match(input, 19, FOLLOW_19_in_lines88);
                stream_19.add(char_literal2);

                pushFollow(FOLLOW_command_in_lines90);
                command3 = command();

                state._fsp--;

                stream_command.add(command3.getTree());
              }
              break;

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

        EOF4 = (Token) match(input, EOF, FOLLOW_EOF_in_lines94);
        stream_EOF.add(EOF4);

        // AST REWRITE
        // elements: command
        // token labels:
        // rule labels: retval
        // token list labels:
        // rule list labels:
        // wildcard labels:
        retval.tree = root_0;
        RewriteRuleSubtreeStream stream_retval =
            new RewriteRuleSubtreeStream(
                adaptor, "rule retval", retval != null ? retval.tree : null);

        root_0 = (Object) adaptor.nil();
        // 86:36: -> ( command )+
        {
          if (!(stream_command.hasNext())) {
            throw new RewriteEarlyExitException();
          }
          while (stream_command.hasNext()) {
            adaptor.addChild(root_0, stream_command.nextTree());
          }
          stream_command.reset();
        }

        retval.tree = root_0;
      }

      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;
  }