public final WaiprParser.machine_return machine() throws RecognitionException {
		WaiprParser.machine_return retval = new WaiprParser.machine_return();
		retval.start = input.LT(1);

		CommonTree root_0 = null;

		Token string_literal2=null;
		Token ID3=null;
		Token char_literal4=null;
		Token char_literal6=null;
		ParserRuleReturnScope block5 =null;

		CommonTree string_literal2_tree=null;
		CommonTree ID3_tree=null;
		CommonTree char_literal4_tree=null;
		CommonTree char_literal6_tree=null;
		RewriteRuleTokenStream stream_22=new RewriteRuleTokenStream(adaptor,"token 22");
		RewriteRuleTokenStream stream_25=new RewriteRuleTokenStream(adaptor,"token 25");
		RewriteRuleTokenStream stream_26=new RewriteRuleTokenStream(adaptor,"token 26");
		RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(adaptor,"token ID");
		RewriteRuleSubtreeStream stream_block=new RewriteRuleSubtreeStream(adaptor,"rule block");

		try {
			// Waipr.g:18:9: ( 'Machine' ID '{' ( block )* '}' -> ^( ID ( block )* ) )
			// Waipr.g:18:11: 'Machine' ID '{' ( block )* '}'
			{
			string_literal2=(Token)match(input,22,FOLLOW_22_in_machine52);  
			stream_22.add(string_literal2);

			ID3=(Token)match(input,ID,FOLLOW_ID_in_machine54);  
			stream_ID.add(ID3);

			char_literal4=(Token)match(input,25,FOLLOW_25_in_machine56);  
			stream_25.add(char_literal4);

			// Waipr.g:18:28: ( block )*
			loop2:
			while (true) {
				int alt2=2;
				int LA2_0 = input.LA(1);
				if ( ((LA2_0 >= 19 && LA2_0 <= 21)||(LA2_0 >= 23 && LA2_0 <= 24)) ) {
					alt2=1;
				}

				switch (alt2) {
				case 1 :
					// Waipr.g:18:28: block
					{
					pushFollow(FOLLOW_block_in_machine58);
					block5=block();
					state._fsp--;

					stream_block.add(block5.getTree());
					}
					break;

				default :
					break loop2;
				}
			}

			char_literal6=(Token)match(input,26,FOLLOW_26_in_machine61);  
			stream_26.add(char_literal6);

			// AST REWRITE
			// elements: ID, block
			// 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.getTree():null);

			root_0 = (CommonTree)adaptor.nil();
			// 18:39: -> ^( ID ( block )* )
			{
				// Waipr.g:18:42: ^( ID ( block )* )
				{
				CommonTree root_1 = (CommonTree)adaptor.nil();
				root_1 = (CommonTree)adaptor.becomeRoot(stream_ID.nextNode(), root_1);
				// Waipr.g:18:47: ( block )*
				while ( stream_block.hasNext() ) {
					adaptor.addChild(root_1, stream_block.nextTree());
				}
				stream_block.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			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 {
			// do for sure before leaving
		}
		return retval;
	}