--- parser3/src/main/compile.y 2005/12/16 14:04:20 1.219 +++ parser3/src/main/compile.y 2007/10/25 10:52:48 1.222 @@ -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.219 2005/12/16 14:04:20 paf Exp $ + $Id: compile.y,v 1.222 2007/10/25 10:52:48 misha Exp $ */ /** @@ -218,7 +218,6 @@ maybe_string: empty | STRING; code_method: '@' STRING bracketed_maybe_strings maybe_bracketed_strings maybe_comment '\n' { PC.explicit_result=false; - const String& name=*LA2S(*$2); YYSTYPE params_names_code=$3; ArrayString* params_names=0; @@ -247,13 +246,17 @@ code_method: '@' STRING bracketed_maybe_ 0, 0/*min,max numbered_params_count*/, params_names, locals_names, 0/*to be filled later in next {} */, 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; + Method& method=*reinterpret_cast($7); + // fill in the code + method.parser_code=$8; + // register in class + const String& name=*LA2S(*$2); + PC.cclass->add_method(PC.alias_method(name), method); }; maybe_bracketed_strings: empty | bracketed_maybe_strings; @@ -1170,6 +1173,8 @@ default: case '=': case '!': // common delimiters case ',': case '?': case '#': + // mysql column separators + case '`': // before call case '^': pop_LS(pc);