docs: public final DSLMapParser.variable_reference_return variable_reference() throws RecognitionException {
  		DSLMapParser.variable_reference_return retval = new DSLMapParser.variable_reference_return();
  		retval.start = input.LT(1);
  
  		Object root_0 = null;
  
  		Token lc=null;
  		Token rc=null;
  		ParserRuleReturnScope name =null;
  
  		Object lc_tree=null;
  		Object rc_tree=null;
  		RewriteRuleTokenStream stream_RIGHT_CURLY=new RewriteRuleTokenStream(adaptor,"token RIGHT_CURLY");
  		RewriteRuleTokenStream stream_LEFT_CURLY=new RewriteRuleTokenStream(adaptor,"token LEFT_CURLY");
  		RewriteRuleSubtreeStream stream_variable_reference_expr=new RewriteRuleSubtreeStream(adaptor,"rule variable_reference_expr");
  
  
  		        boolean hasSpaceBefore = false;
  		        boolean hasSpaceAfter = false;
  		        String text = "";
  
  		try {
  			// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:234:5: (lc= LEFT_CURLY name= variable_reference_expr rc= RIGHT_CURLY -> { hasSpaceBefore && hasSpaceAfter}? VT_SPACE ^( VT_VAR_REF LITERAL[$name.start,$name.text] ) VT_SPACE -> { hasSpaceBefore && !hasSpaceAfter}? VT_SPACE ^( VT_VAR_REF LITERAL[$name.start,$name.text] ) -> {!hasSpaceBefore && hasSpaceAfter}? ^( VT_VAR_REF LITERAL[$name.start,$name.text] ) VT_SPACE -> ^( VT_VAR_REF LITERAL[$name.start,$name.text] ) )
  			// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:234:7: lc= LEFT_CURLY name= variable_reference_expr rc= RIGHT_CURLY
  			{
  			lc=(Token)match(input,LEFT_CURLY,FOLLOW_LEFT_CURLY_in_variable_reference1389); if (state.failed) return retval; 
  			if ( state.backtracking==0 ) stream_LEFT_CURLY.add(lc);
  
  			if ( state.backtracking==0 ) {
  			        CommonToken back2 =  (CommonToken)input.LT(-2);
  			        if( back2!=null && back2.getStopIndex() < ((CommonToken)lc).getStartIndex() -1 ) hasSpaceBefore = true;
  			        }
  			pushFollow(FOLLOW_variable_reference_expr_in_variable_reference1409);
  			name=variable_reference_expr();
  			state._fsp--;
  			if (state.failed) return retval;
  			if ( state.backtracking==0 ) stream_variable_reference_expr.add(name.getTree());
  			rc=(Token)match(input,RIGHT_CURLY,FOLLOW_RIGHT_CURLY_in_variable_reference1413); if (state.failed) return retval; 
  			if ( state.backtracking==0 ) stream_RIGHT_CURLY.add(rc);
  
  			if ( state.backtracking==0 ) {if(((CommonToken)rc).getStopIndex() < ((CommonToken)input.LT(1)).getStartIndex() - 1) hasSpaceAfter = true;}
  			// AST REWRITE
  			// elements: 
  			// token labels: 
  			// rule labels: retval
  			// token list labels: 
  			// rule list labels: 
  			// wildcard labels: 
  			if ( state.backtracking==0 ) {
  			retval.tree = root_0;
  			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);
  
  			root_0 = (Object)adaptor.nil();
  			// 241:5: -> { hasSpaceBefore && hasSpaceAfter}? VT_SPACE ^( VT_VAR_REF LITERAL[$name.start,$name.text] ) VT_SPACE
  			if ( hasSpaceBefore &&  hasSpaceAfter) {
  				adaptor.addChild(root_0, (Object)adaptor.create(VT_SPACE, "VT_SPACE"));
  				// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:241:54: ^( VT_VAR_REF LITERAL[$name.start,$name.text] )
  				{
  				Object root_1 = (Object)adaptor.nil();
  				root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_VAR_REF, "VT_VAR_REF"), root_1);
  				adaptor.addChild(root_1, (Object)adaptor.create(LITERAL, (name!=null?(name.start):null), (name!=null?input.toString(name.start,name.stop):null)));
  				adaptor.addChild(root_0, root_1);
  				}
  
  				adaptor.addChild(root_0, (Object)adaptor.create(VT_SPACE, "VT_SPACE"));
  			}
  
  			else // 242:5: -> { hasSpaceBefore && !hasSpaceAfter}? VT_SPACE ^( VT_VAR_REF LITERAL[$name.start,$name.text] )
  			if ( hasSpaceBefore && !hasSpaceAfter) {
  				adaptor.addChild(root_0, (Object)adaptor.create(VT_SPACE, "VT_SPACE"));
  				// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:242:54: ^( VT_VAR_REF LITERAL[$name.start,$name.text] )
  				{
  				Object root_1 = (Object)adaptor.nil();
  				root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_VAR_REF, "VT_VAR_REF"), root_1);
  				adaptor.addChild(root_1, (Object)adaptor.create(LITERAL, (name!=null?(name.start):null), (name!=null?input.toString(name.start,name.stop):null)));
  				adaptor.addChild(root_0, root_1);
  				}
  
  			}
  
  			else // 243:5: -> {!hasSpaceBefore && hasSpaceAfter}? ^( VT_VAR_REF LITERAL[$name.start,$name.text] ) VT_SPACE
  			if (!hasSpaceBefore &&  hasSpaceAfter) {
  				// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:243:54: ^( VT_VAR_REF LITERAL[$name.start,$name.text] )
  				{
  				Object root_1 = (Object)adaptor.nil();
  				root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_VAR_REF, "VT_VAR_REF"), root_1);
  				adaptor.addChild(root_1, (Object)adaptor.create(LITERAL, (name!=null?(name.start):null), (name!=null?input.toString(name.start,name.stop):null)));
  				adaptor.addChild(root_0, root_1);
  				}
  
  				adaptor.addChild(root_0, (Object)adaptor.create(VT_SPACE, "VT_SPACE"));
  			}
  
  			else // 244:5: -> ^( VT_VAR_REF LITERAL[$name.start,$name.text] )
  			{
  				// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:244:54: ^( VT_VAR_REF LITERAL[$name.start,$name.text] )
  				{
  				Object root_1 = (Object)adaptor.nil();
  				root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_VAR_REF, "VT_VAR_REF"), root_1);
  				adaptor.addChild(root_1, (Object)adaptor.create(LITERAL, (name!=null?(name.start):null), (name!=null?input.toString(name.start,name.stop):null)));
  				adaptor.addChild(root_0, root_1);
  				}
  
  			}
  
  
  			retval.tree = root_0;
  			}
  
  			}
  
  			retval.stop = input.LT(-1);
  
  			if ( state.backtracking==0 ) {
  			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 {
  			// do for sure before leaving
  		}
  		return retval;
  	}