--- parser3/src/main/compile.y 2004/04/06 11:58:15 1.209.2.1 +++ parser3/src/main/compile.y 2004/04/06 14:08:41 1.210 @@ -5,7 +5,7 @@ Copyright (c) 2001, 2003 ArtLebedev Group (http://www.artlebedev.com) Author: Alexander Petrosyan (http://design.ru/paf) - $Id: compile.y,v 1.209.2.1 2004/04/06 11:58:15 paf Exp $ + $Id: compile.y,v 1.210 2004/04/06 14:08:41 paf Exp $ */ /** @@ -381,14 +381,9 @@ codes__excluding_sole_str_literal: actio call: call_value { $$=$1; /* stack: value */ - if(PC.explicit_result) - changetail_or_append(*$$, - OP_CALL, true, /*->*/ OP_CALL__WRITE__EXPLICIT_RESULT, - /*or */OP_WRITE_VALUE/*__EXPLICIT_RESULT*/); /* value=pop; check_empty(value) */ - else - changetail_or_append(*$$, - OP_CALL, true, /*->*/ OP_CALL__WRITE, - /*or */OP_WRITE_VALUE); /* value=pop; wcontext.write(value) */ + changetail_or_append(*$$, + OP_CALL, true, /*->*/ OP_CALL__WRITE, + /*or */OP_WRITE_VALUE); /* value=pop; wcontext.write(value) */ }; call_value: '^' { PC.in_call_value=true; @@ -417,7 +412,12 @@ store_param: | store_round_param | store_curly_param ; -store_square_param: '[' store_code_param_parts ']' {$$=$2}; +store_square_param: '[' { + // allow ^call[ whitespace here any time ] + *reinterpret_cast(&$$)=PC.explicit_result; PC.explicit_result=false; +} store_code_param_parts { + PC.explicit_result=reinterpret_cast($2); +} ']' {$$=$3}; store_round_param: '(' store_expr_param_parts ')' {$$=$2}; store_curly_param: '{' store_curly_param_parts '}' {$$=$2}; store_code_param_parts: