--- parser3/src/main/compile.y 2005/11/21 10:15:53 1.213.10.6 +++ parser3/src/main/compile.y 2007/10/17 13:34:59 1.221 @@ -5,7 +5,7 @@ Copyright (c) 2001-2005 ArtLebedev Group (http://www.artlebedev.com) Author: Alexander Petrosyan (http://design.ru/paf) - $Id: compile.y,v 1.213.10.6 2005/11/21 10:15:53 paf Exp $ + $Id: compile.y,v 1.221 2007/10/17 13:34:59 misha Exp $ */ /** @@ -216,7 +216,7 @@ control_strings: control_string | contro control_string: maybe_string '\n'; maybe_string: empty | STRING; -code_method: '@' STRING bracketed_maybe_strings maybe_bracketed_strings maybe_comment '\n' { +code_method: '@' STRING bracketed_maybe_strings maybe_bracketed_strings maybe_comment '\n' maybe_codes { PC.explicit_result=false; const String& name=*LA2S(*$2); @@ -246,14 +246,12 @@ code_method: '@' STRING bracketed_maybe_ Method::CT_ANY, 0, 0/*min,max numbered_params_count*/, params_names, locals_names, - 0/*to be filled later in next {} */, 0); + $7, 0); + PC.cclass->add_method(PC.alias_method(name), *method); *reinterpret_cast(&$$)=method; // todo: check [][;result;] -} maybe_codes { - // fill in the code - reinterpret_cast($7)->parser_code=$8; }; maybe_bracketed_strings: empty | bracketed_maybe_strings; @@ -409,7 +407,7 @@ call_value: '^' { YYSTYPE params_code=$5; if(params_code->count()==4) { // probably [] case. [OP_VALUE+origin+Void+STORE_PARAM] if(Value* value=LA2V(*params_code)) // it is OP_VALUE+origin+value? - if(!value->is_defined()) // value is VVoid? + if(value->is_void()) // value is VVoid? params_code=0; // ^zzz[] case. don't append lone empty param. } /* stack: context, method_junction */ @@ -758,9 +756,9 @@ default: } // #HH ? if(pc.source[0]=='#' && pc.source[1] && pc.source[2]) { - char c= + char c=(char)( hex_value[(unsigned char)pc.source[1]]*0x10+ - hex_value[(unsigned char)pc.source[2]]; + hex_value[(unsigned char)pc.source[2]]); if(c==0) { result=BAD_HEX_LITERAL; goto break2; // wrong hex value[no ^#00 chars allowed]: bail out @@ -1170,6 +1168,8 @@ default: case '=': case '!': // common delimiters case ',': case '?': case '#': + // mysql column separators + case '`': // before call case '^': pop_LS(pc);