Diff for /parser3/src/main/compile.tab.C between versions 1.75.4.1 and 1.81.2.13.2.19

version 1.75.4.1, 2002/10/31 14:05:01 version 1.81.2.13.2.19, 2003/04/01 07:59:08
Line 40 Line 40
 /** @file  /** @file
         Parser: compiler(lexical parser and grammar).          Parser: compiler(lexical parser and grammar).
   
         Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com)          Copyright (c) 2001, 2003 ArtLebedev Group (http://www.artlebedev.com)
         Author: Alexander Petrosyan <paf@design.ru> (http://design.ru/paf)          Author: Alexander Petrosyan <paf@design.ru> (http://design.ru/paf)
   
         $Id$          $Id$
Line 57 Line 57
                 -#:     in iis make up specialized Pool object for that                  -#:     in iis make up specialized Pool object for that
 */  */
   
 #define YYSTYPE  Array/*<Operation>*/ *  #define YYSTYPE  ArrayOperation* 
 #define YYPARSE_PARAM  pc  #define YYPARSE_PARAM  pc
 #define YYLEX_PARAM  pc  #define YYLEX_PARAM  pc
 #define YYDEBUG  1  #define YYDEBUG  1
Line 82  static int yylex(YYSTYPE *lvalp, void *p Line 82  static int yylex(YYSTYPE *lvalp, void *p
   
   
 // local convinient inplace typecast & var  // local convinient inplace typecast & var
   #undef PC
 #define PC  (*(parse_control *)pc)  #define PC  (*(parse_control *)pc)
   #undef POOL
 #define POOL  (*PC.pool)  #define POOL  (*PC.pool)
 #undef NEW  
 #define NEW new(POOL)  
 #ifndef DOXYGEN  #ifndef DOXYGEN
 #ifndef YYSTYPE  #ifndef YYSTYPE
 #define YYSTYPE int  #define YYSTYPE int
Line 210  static const short yyrhs[] = {    62, Line 210  static const short yyrhs[] = {    62,
   
 #if YYDEBUG != 0  #if YYDEBUG != 0
 static const short yyrline[] = { 0,  static const short yyrline[] = { 0,
    115,   125,   127,   127,   128,   130,   130,   132,   199,   199,     115,   123,   125,   125,   126,   128,   128,   130,   202,   202,
    200,   200,   201,   202,   202,   204,   233,   233,   234,   235,     203,   203,   204,   205,   205,   207,   236,   236,   237,   238,
    235,   236,   236,   238,   238,   242,   242,   244,   244,   245,     238,   239,   239,   241,   241,   245,   245,   247,   247,   248,
    245,   246,   246,   246,   250,   257,   258,   258,   259,   260,     248,   249,   249,   249,   253,   260,   261,   261,   262,   263,
    262,   263,   285,   286,   286,   290,   294,   296,   297,   298,     265,   266,   288,   289,   289,   293,   297,   299,   300,   301,
    315,   320,   322,   324,   325,   327,   333,   341,   347,   349,     318,   323,   325,   327,   328,   330,   336,   344,   350,   352,
    350,   352,   358,   359,   359,   363,   369,   372,   375,   388,     353,   355,   361,   362,   362,   366,   372,   375,   378,   391,
    390,   390,   391,   393,   394,   396,   397,   398,   399,   401,     393,   393,   394,   396,   397,   399,   400,   401,   402,   404,
    403,   405,   407,   409,   411,   415,   419,   423,   425,   426,     406,   408,   410,   412,   414,   418,   422,   426,   428,   429,
    428,   437,   437,   439,   439,   440,   441,   449,   454,   456,     431,   440,   440,   442,   442,   443,   444,   452,   457,   459,
    458,   459,   460,   462,   466,   475,   481,   486,   486,   487,     461,   462,   463,   465,   469,   478,   484,   489,   489,   490,
    492,   494,   496,   508,   520,   525,   527,   528,   529,   530,     495,   497,   499,   511,   523,   528,   530,   531,   532,   533,
    531,   533,   534,   535,   536,   537,   538,   539,   540,   542,     534,   536,   537,   538,   539,   540,   541,   542,   543,   545,
    543,   544,   545,   546,   547,   548,   549,   550,   551,   552,     546,   547,   548,   549,   550,   551,   552,   553,   554,   555,
    553,   554,   555,   556,   557,   558,   559,   560,   561,   562,     556,   557,   558,   559,   560,   561,   562,   563,   564,   565,
    563,   564,   565,   566,   567,   568,   571,   580,   585,   586     566,   567,   568,   569,   570,   571,   574,   583,   588,   589
 };  };
 #endif  #endif
   
Line 1034  yyreduce: Line 1034  yyreduce:
 case 1:  case 1:
 #line 116 "compile.y"  #line 116 "compile.y"
 {  {
         Method& method=*NEW Method(POOL,           Method& method=*new Method(/*main_method_name, */Method::CT_ANY,
                 PC.request->main_method_name,   
                 Method::CT_ANY,  
                 0, 0, /*min, max numbered_params_count*/                  0, 0, /*min, max numbered_params_count*/
                 0/*param_names*/, 0/*local_names*/,                   0/*param_names*/, 0/*local_names*/, 
                 yyvsp[0]/*parser_code*/, 0/*native_code*/);                  yyvsp[0]/*parser_code*/, 0/*native_code*/);
         PC.cclass->add_method(PC.request->main_method_name, method);          PC.cclass->add_method(main_method_name, method);
 ;  ;
     break;}      break;}
 case 8:  case 8:
 #line 133 "compile.y"  #line 131 "compile.y"
 {  {
         const String& command=*LA2S(yyvsp[-2]);          const String& command=*LA2S(*yyvsp[-2]);
         YYSTYPE strings_code=yyvsp[0];          YYSTYPE strings_code=yyvsp[0];
         if(strings_code->size()<1*2) {          if(strings_code->count()<1*2) {
                 strcpy(PC.error, "@");                  strcpy(PC.error, "@");
                 strcat(PC.error, command.cstr());                  strcat(PC.error, command.cstr());
                 strcat(PC.error, " is empty");                  strcat(PC.error, " is empty");
Line 1061  case 8: Line 1059  case 8:
                         strcat(PC.error, "'");                          strcat(PC.error, "'");
                         YYERROR;                          YYERROR;
                 }                  }
                 if(strings_code->size()==1*2) {                  if(strings_code->count()==1*2) {
                         // new class' name                          // new class' name
                         const String *name=LA2S(strings_code);                          const String& name=*LA2S(*strings_code);
                         // creating the class                          // creating the class
                         PC.cclass=NEW VClass(POOL);                          VStateless_class* cclass=new VClass;
                         PC.cclass->set_name(*name);                          PC.cclass=cclass;
                           PC.cclass->set_name(name);
                         // append to request's classes                          // append to request's classes
                         PC.request->classes().put(*name, PC.cclass);                          PC.request.classes().put(name, cclass);
                 } else {                  } else {
                         strcpy(PC.error, "@"CLASS_NAME" must contain sole name");                          strcpy(PC.error, "@"CLASS_NAME" must contain sole name");
                         YYERROR;                          YYERROR;
                 }                  }
         } else if(command==USE_CONTROL_METHOD_NAME) {          } else if(command==USE_CONTROL_METHOD_NAME) {
                 for(int i=0; i<strings_code->size(); i+=2)                   for(size_t i=0; i<strings_code->count(); i+=2) 
                         PC.request->use_file(PC.request->main_class, *LA2S(strings_code, i));                          PC.request.use_file(PC.request.main_class, *LA2S(*strings_code, i));
         } else if(command==BASE_NAME) {          } else if(command==BASE_NAME) {
                 if(PC.cclass->base_class()) { // already changed from default?                  if(PC.cclass->base_class()) { // already changed from default?
                         strcpy(PC.error, "class already have a base '");                          strcpy(PC.error, "class already have a base '");
Line 1083  case 8: Line 1082  case 8:
                         strcat(PC.error, "'");                          strcat(PC.error, "'");
                         YYERROR;                          YYERROR;
                 }                  }
                 if(strings_code->size()==1*2) {                  if(strings_code->count()==1*2) {
                         const String& base_name=*LA2S(strings_code);                          const String& base_name=*LA2S(*strings_code);
                         Value *vbase_class=static_cast<VClass *>(                          if(Value* base_class_value=PC.request.classes().get(base_name)) {
                                 PC.request->classes().get(base_name));                                  // @CLASS == @BASE sanity check
                         VStateless_class *base_class=vbase_class?vbase_class->get_class():0;                                  if(VStateless_class *base_class=base_class_value->get_class()) {
                         if(!base_class) {                                          if(PC.cclass==base_class) {
                                                   strcpy(PC.error, "@"CLASS_NAME" equals @"BASE_NAME);
                                                   YYERROR;
                                           }
                                           PC.cclass->get_class()->set_base(base_class);
                                   } else { // they asked to derive from a class without methods ['env' & co]
                                           strcpy(PC.error, base_name.cstr());
                                           strcat(PC.error, ": you can not derive from this class in @"BASE_NAME);
                                           YYERROR;
                                   }
                           } else {
                                 strcpy(PC.error, base_name.cstr());                                  strcpy(PC.error, base_name.cstr());
                                 strcat(PC.error, ": undefined class in @"BASE_NAME);                                  strcat(PC.error, ": undefined class in @"BASE_NAME);
                                 YYERROR;                                  YYERROR;
                         }                          }
                         // @CLASS == @BASE sanity check  
                         if(PC.cclass==base_class) {  
                                 strcpy(PC.error, "@"CLASS_NAME" equals @"BASE_NAME);  
                                 YYERROR;  
                         }  
                         PC.cclass->set_base(base_class);  
                 } else {                  } else {
                         strcpy(PC.error, "@"BASE_NAME" must contain sole name");                          strcpy(PC.error, "@"BASE_NAME" must contain sole name");
                         YYERROR;                          YYERROR;
Line 1113  case 8: Line 1116  case 8:
 ;  ;
     break;}      break;}
 case 12:  case 12:
 #line 200 "compile.y"  #line 203 "compile.y"
 { yyval=yyvsp[-1]; P(yyval, yyvsp[0]) ;  { yyval=yyvsp[-1]; P(*yyval, *yyvsp[0]) ;
     break;}      break;}
 case 16:  case 16:
 #line 205 "compile.y"  #line 208 "compile.y"
 {  {
         const String *name=LA2S(yyvsp[-5]);          const String& name=*LA2S(*yyvsp[-5]);
   
         YYSTYPE params_names_code=yyvsp[-4];          YYSTYPE params_names_code=yyvsp[-4];
         Array *params_names=0;          ArrayString* params_names=0;
         if(int size=params_names_code->size()) {          if(int size=params_names_code->count()) {
                 params_names=NEW Array(POOL);                  params_names=new ArrayString;
                 for(int i=0; i<size; i+=2)                  for(int i=0; i<size; i+=2)
                         *params_names+=LA2S(params_names_code, i);                          *params_names+=LA2S(*params_names_code, i);
         }          }
   
         YYSTYPE locals_names_code=yyvsp[-3];          YYSTYPE locals_names_code=yyvsp[-3];
         Array *locals_names=0;          ArrayString* locals_names=0;
         if(int size=locals_names_code->size()) {          if(int size=locals_names_code->count()) {
                 locals_names=NEW Array(POOL);                  locals_names=new ArrayString;
                 for(int i=0; i<size; i+=2)                  for(int i=0; i<size; i+=2)
                         *locals_names+=LA2S(locals_names_code, i);                          *locals_names+=LA2S(*locals_names_code, i);
         }          }
   
         Method& method=*NEW Method(POOL,           Method& method=*new Method(
                 *name,                   //name, 
                 Method::CT_ANY,                  Method::CT_ANY,
                 0, 0/*min,max numbered_params_count*/,                   0, 0/*min,max numbered_params_count*/, 
                 params_names, locals_names,                   params_names, locals_names, 
                 yyvsp[0], 0);                  yyvsp[0], 0);
         PC.cclass->add_method(*name, method);          PC.cclass->add_method(name, method);
 ;  ;
     break;}      break;}
 case 19:  case 19:
 #line 234 "compile.y"  #line 237 "compile.y"
 {yyval=yyvsp[-1];  {yyval=yyvsp[-1];
     break;}      break;}
 case 23:  case 23:
 #line 236 "compile.y"  #line 239 "compile.y"
 { yyval=yyvsp[-2]; P(yyval, yyvsp[0]) ;  { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]) ;
     break;}      break;}
 case 29:  case 29:
 #line 244 "compile.y"  #line 247 "compile.y"
 { yyval=yyvsp[-1]; P(yyval, yyvsp[0]) ;  { yyval=yyvsp[-1]; P(*yyval, *yyvsp[0]) ;
     break;}      break;}
 case 35:  case 35:
 #line 250 "compile.y"  #line 253 "compile.y"
 {  {
         yyval=yyvsp[0]; /* stack: resulting value */           yyval=yyvsp[0]; /* stack: resulting value */ 
         changetail_or_append(yyval,           changetail_or_append(*yyval, 
                 OP_GET_ELEMENT, false,  /*->*/OP_GET_ELEMENT__WRITE,                  OP_GET_ELEMENT, false,  /*->*/OP_GET_ELEMENT__WRITE,
                 /*or */OP_WRITE_VALUE                  /*or */OP_WRITE_VALUE
                 ); /* value=pop; wcontext.write(value) */                  ); /* value=pop; wcontext.write(value) */
 ;  ;
     break;}      break;}
 case 36:  case 36:
 #line 257 "compile.y"  #line 260 "compile.y"
 { yyval=yyvsp[0] ;  { yyval=yyvsp[0] ;
     break;}      break;}
 case 39:  case 39:
 #line 259 "compile.y"  #line 262 "compile.y"
 { yyval=yyvsp[-1] ;  { yyval=yyvsp[-1] ;
     break;}      break;}
 case 42:  case 42:
 #line 263 "compile.y"  #line 266 "compile.y"
 {  {
         yyval=N(POOL);           yyval=N(); 
         Array *diving_code=yyvsp[0];          ArrayOperation* diving_code=yyvsp[0];
         const String *first_name=LA2S(diving_code);          const String* first_name=LA2S(*diving_code);
         // self.xxx... -> xxx...          // self.xxx... -> xxx...
         // OP_VALUE+string+OP_GET_ELEMENT+... -> OP_WITH_SELF+...          // OP_VALUE+string+OP_GET_ELEMENT+... -> OP_WITH_SELF+...
         if(first_name && *first_name==SELF_ELEMENT_NAME) {          if(first_name && *first_name==SELF_ELEMENT_NAME) {
                 O(yyval, OP_WITH_SELF); /* stack: starting context */                  O(*yyval, OP_WITH_SELF); /* stack: starting context */
                 P(yyval, diving_code,                   P(*yyval, *diving_code, 
                         /* skip over... */                          /* skip over... */
                         diving_code->size()>=3?3/*OP_VALUE+string+OP_GET_ELEMENTx*/:2/*OP_+string*/);                          diving_code->count()>=3?3/*OP_VALUE+string+OP_GET_ELEMENTx*/:2/*OP_+string*/);
         } else {          } else {
                 O(yyval, OP_WITH_READ); /* stack: starting context */                  O(*yyval, OP_WITH_READ); /* stack: starting context */
   
                 // ^if ELEMENT -> ^if ELEMENT_OR_OPERATOR                  // ^if ELEMENT -> ^if ELEMENT_OR_OPERATOR
                 // OP_VALUE+string+OP_GET_ELEMENT. -> OP_VALUE+string+OP_GET_ELEMENT_OR_OPERATOR.                  // OP_VALUE+string+OP_GET_ELEMENT. -> OP_VALUE+string+OP_GET_ELEMENT_OR_OPERATOR.
                 if(PC.in_call_value && diving_code->size()==3)                  if(PC.in_call_value && diving_code->count()==3)
                         diving_code->put_int(2, OP_GET_ELEMENT_OR_OPERATOR);                          diving_code->put(2, OP_GET_ELEMENT_OR_OPERATOR);
                 P(yyval, diving_code);                  P(*yyval, *diving_code);
         }          }
         /* diving code; stack: current context */          /* diving code; stack: current context */
 ;  ;
     break;}      break;}
 case 43:  case 43:
 #line 285 "compile.y"  #line 288 "compile.y"
 { yyval=yyvsp[-1]; P(yyval, yyvsp[0]) ;  { yyval=yyvsp[-1]; P(*yyval, *yyvsp[0]) ;
     break;}      break;}
 case 45:  case 45:
 #line 286 "compile.y"  #line 289 "compile.y"
 { yyval=yyvsp[-1]; P(yyval, yyvsp[0]) ;  { yyval=yyvsp[-1]; P(*yyval, *yyvsp[0]) ;
     break;}      break;}
 case 46:  case 46:
 #line 290 "compile.y"  #line 293 "compile.y"
 {  {
         yyval=yyvsp[-1]; /* stack: context,name */          yyval=yyvsp[-1]; /* stack: context,name */
         P(yyval, yyvsp[0]); /* stack: context,name,constructor_value */          P(*yyval, *yyvsp[0]); /* stack: context,name,constructor_value */
 ;  ;
     break;}      break;}
 case 50:  case 50:
 #line 298 "compile.y"  #line 301 "compile.y"
 {  {
         yyval=N(POOL);          yyval=N();
         Array *diving_code=yyvsp[0];          ArrayOperation* diving_code=yyvsp[0];
         const String *first_name=LA2S(diving_code);          const String* first_name=LA2S(*diving_code);
         // $self.xxx... -> $xxx...          // $self.xxx... -> $xxx...
         // OP_VALUE+string+OP_GET_ELEMENT+... -> OP_WITH_SELF+...          // OP_VALUE+string+OP_GET_ELEMENT+... -> OP_WITH_SELF+...
         if(first_name && *first_name==SELF_ELEMENT_NAME) {          if(first_name && *first_name==SELF_ELEMENT_NAME) {
                 O(yyval, OP_WITH_SELF); /* stack: starting context */                  O(*yyval, OP_WITH_SELF); /* stack: starting context */
                 P(yyval, diving_code,                   P(*yyval, *diving_code, 
                         /* skip over... */                          /* skip over... */
                         diving_code->size()>=3?3/*OP_VALUE+string+OP_GET_ELEMENTx*/:2/*OP_+string*/);                          diving_code->count()>=3?3/*OP_VALUE+string+OP_GET_ELEMENTx*/:2/*OP_+string*/);
         } else {          } else {
                 O(yyval, OP_WITH_ROOT); /* stack: starting context */                  O(*yyval, OP_WITH_ROOT); /* stack: starting context */
                 P(yyval, diving_code);                  P(*yyval, *diving_code);
         }          }
         /* diving code; stack: current context */          /* diving code; stack: current context */
 ;  ;
     break;}      break;}
 case 51:  case 51:
 #line 315 "compile.y"  #line 318 "compile.y"
 {  {
         yyval=N(POOL);           yyval=N(); 
         O(yyval, OP_WITH_WRITE); /* stack: starting context */          O(*yyval, OP_WITH_WRITE); /* stack: starting context */
         P(yyval, yyvsp[0]); /* diving code; stack: context,name */          P(*yyval, *yyvsp[0]); /* diving code; stack: context,name */
 ;  ;
     break;}      break;}
 case 52:  case 52:
 #line 320 "compile.y"  #line 323 "compile.y"
 { yyval=yyvsp[-1]; P(yyval, yyvsp[0]) ;  { yyval=yyvsp[-1]; P(*yyval, *yyvsp[0]) ;
     break;}      break;}
 case 56:  case 56:
 #line 327 "compile.y"  #line 330 "compile.y"
 {  {
         // stack: context, name          // stack: context, name
         yyval=yyvsp[-1]; // stack: context, name, value          yyval=yyvsp[-1]; // stack: context, name, value
         O(yyval, OP_CONSTRUCT_VALUE); /* value=pop; name=pop; context=pop; construct(context,name,value) */          O(*yyval, OP_CONSTRUCT_VALUE); /* value=pop; name=pop; context=pop; construct(context,name,value) */
 ;  ;
     break;}      break;}
 case 57:  case 57:
 #line 333 "compile.y"  #line 336 "compile.y"
 {   { 
         yyval=N(POOL);           yyval=N(); 
         O(yyval, OP_PREPARE_TO_EXPRESSION);          O(*yyval, OP_PREPARE_TO_EXPRESSION);
         // stack: context, name          // stack: context, name
         P(yyval, yyvsp[-1]); // stack: context, name, value          P(*yyval, *yyvsp[-1]); // stack: context, name, value
         O(yyval, OP_CONSTRUCT_EXPR); /* value=pop->as_expr_result; name=pop; context=pop; construct(context,name,value) */          O(*yyval, OP_CONSTRUCT_EXPR); /* value=pop->as_expr_result; name=pop; context=pop; construct(context,name,value) */
 ;  ;
     break;}      break;}
 case 58:  case 58:
 #line 341 "compile.y"  #line 344 "compile.y"
 {  {
         // stack: context, name          // stack: context, name
         yyval=N(POOL);           yyval=N(); 
         OA(yyval, OP_CURLY_CODE__CONSTRUCT, yyvsp[-1]); /* code=pop; name=pop; context=pop; construct(context,name,junction(code)) */          OA(*yyval, OP_CURLY_CODE__CONSTRUCT, yyvsp[-1]); /* code=pop; name=pop; context=pop; construct(context,name,junction(code)) */
 ;  ;
     break;}      break;}
 case 62:  case 62:
 #line 352 "compile.y"  #line 355 "compile.y"
 {  {
         yyval=N(POOL);           yyval=N(); 
         OA(yyval, OP_OBJECT_POOL, yyvsp[0]); /* stack: empty write context */          OA(*yyval, OP_OBJECT_POOL, yyvsp[0]); /* stack: empty write context */
         /* some code that writes to that context */          /* some code that writes to that context */
         /* context=pop; stack: context.value() */          /* context=pop; stack: context.value() */
 ;  ;
     break;}      break;}
 case 65:  case 65:
 #line 359 "compile.y"  #line 362 "compile.y"
 { yyval=yyvsp[-1]; P(yyval, yyvsp[0]) ;  { yyval=yyvsp[-1]; P(*yyval, *yyvsp[0]) ;
     break;}      break;}
 case 66:  case 66:
 #line 363 "compile.y"  #line 366 "compile.y"
 {  {
         yyval=yyvsp[0]; /* stack: value */          yyval=yyvsp[0]; /* stack: value */
         changetail_or_append(yyval,           changetail_or_append(*yyval, 
                 OP_CALL, true,  /*->*/ OP_CALL__WRITE,                  OP_CALL, true,  /*->*/ OP_CALL__WRITE,
                 /*or */OP_WRITE_VALUE); /* value=pop; wcontext.write(value) */                  /*or */OP_WRITE_VALUE); /* value=pop; wcontext.write(value) */
 ;  ;
     break;}      break;}
 case 67:  case 67:
 #line 369 "compile.y"  #line 372 "compile.y"
 {   { 
                                         PC.in_call_value=true;                                           PC.in_call_value=true; 
                         ;                          ;
     break;}      break;}
 case 68:  case 68:
 #line 372 "compile.y"  #line 375 "compile.y"
 {  {
                                 PC.in_call_value=false;                                  PC.in_call_value=false;
                         ;                          ;
     break;}      break;}
 case 69:  case 69:
 #line 375 "compile.y"  #line 378 "compile.y"
 { /* ^field.$method{vasya} */  { /* ^field.$method{vasya} */
         yyval=yyvsp[-3]; /* with_xxx,diving code; stack: context,method_junction */          yyval=yyvsp[-3]; /* with_xxx,diving code; stack: context,method_junction */
   
         YYSTYPE params_code=yyvsp[-1];          YYSTYPE params_code=yyvsp[-1];
         if(params_code->size()==3) { // probably [] case. [OP_VALUE + Void + STORE_PARAM]          if(params_code->count()==3) { // probably [] case. [OP_VALUE + Void + STORE_PARAM]
                 if(Value *value=LA2V(params_code)) // it is OP_VALUE + value?                  if(Value* value=LA2V(*params_code)) // it is OP_VALUE + value?
                         if(!value->is_defined()) // value is VVoid?                          if(!value->is_defined()) // value is VVoid?
                                 params_code=0; // ^zzz[] case. don't append lone empty param.                                  params_code=0; // ^zzz[] case. don't append lone empty param.
         }          }
         /* stack: context, method_junction */          /* stack: context, method_junction */
         OA(yyval, OP_CALL, params_code); // method_frame=make frame(pop junction); ncontext=pop; call(ncontext,method_frame) stack: value          OA(*yyval, OP_CALL, params_code); // method_frame=make frame(pop junction); ncontext=pop; call(ncontext,method_frame) stack: value
 ;  ;
     break;}      break;}
 case 72:  case 72:
 #line 390 "compile.y"  #line 393 "compile.y"
 { yyval=yyvsp[-1]; P(yyval, yyvsp[0]) ;  { yyval=yyvsp[-1]; P(*yyval, *yyvsp[0]) ;
     break;}      break;}
 case 76:  case 76:
 #line 396 "compile.y"  #line 399 "compile.y"
 {yyval=yyvsp[-1];  {yyval=yyvsp[-1];
     break;}      break;}
 case 77:  case 77:
 #line 397 "compile.y"  #line 400 "compile.y"
 {yyval=yyvsp[-1];  {yyval=yyvsp[-1];
     break;}      break;}
 case 78:  case 78:
 #line 398 "compile.y"  #line 401 "compile.y"
 {yyval=yyvsp[-1];  {yyval=yyvsp[-1];
     break;}      break;}
 case 80:  case 80:
 #line 401 "compile.y"  #line 404 "compile.y"
 { yyval=yyvsp[-2]; P(yyval, yyvsp[0]) ;  { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]) ;
     break;}      break;}
 case 82:  case 82:
 #line 405 "compile.y"  #line 408 "compile.y"
 { yyval=yyvsp[-2]; P(yyval, yyvsp[0]) ;  { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]) ;
     break;}      break;}
 case 84:  case 84:
 #line 409 "compile.y"  #line 412 "compile.y"
 { yyval=yyvsp[-2]; P(yyval, yyvsp[0]) ;  { yyval=yyvsp[-2]; P(*yyval, *yyvsp[0]) ;
     break;}      break;}
 case 85:  case 85:
 #line 411 "compile.y"  #line 414 "compile.y"
 {  {
         yyval=yyvsp[0];          yyval=yyvsp[0];
         O(yyval, OP_STORE_PARAM);          O(*yyval, OP_STORE_PARAM);
 ;  ;
     break;}      break;}
 case 86:  case 86:
 #line 415 "compile.y"  #line 418 "compile.y"
 {  {
         yyval=N(POOL);           yyval=N(); 
         OA(yyval, OP_EXPR_CODE__STORE_PARAM, yyvsp[0]);          OA(*yyval, OP_EXPR_CODE__STORE_PARAM, yyvsp[0]);
 ;  ;
     break;}      break;}
 case 87:  case 87:
 #line 419 "compile.y"  #line 422 "compile.y"
 {  {
         yyval=N(POOL);           yyval=N(); 
         OA(yyval, OP_CURLY_CODE__STORE_PARAM, yyvsp[0]);          OA(*yyval, OP_CURLY_CODE__STORE_PARAM, yyvsp[0]);
 ;  ;
     break;}      break;}
 case 91:  case 91:
 #line 428 "compile.y"  #line 431 "compile.y"
 {  {
         yyval=N(POOL);           yyval=N(); 
         O(yyval, OP_PREPARE_TO_EXPRESSION);          O(*yyval, OP_PREPARE_TO_EXPRESSION);
         P(yyval, yyvsp[0]);          P(*yyval, *yyvsp[0]);
         O(yyval, OP_WRITE_EXPR_RESULT);          O(*yyval, OP_WRITE_EXPR_RESULT);
 ;  ;
     break;}      break;}
 case 93:  case 93:
 #line 437 "compile.y"  #line 440 "compile.y"
 { yyval=yyvsp[-1]; P(yyval, yyvsp[0]) ;  { yyval=yyvsp[-1]; P(*yyval, *yyvsp[0]) ;
     break;}      break;}
 case 95:  case 95:
 #line 439 "compile.y"  #line 442 "compile.y"
 { yyval=yyvsp[-1]; P(yyval, yyvsp[0]) ;  { yyval=yyvsp[-1]; P(*yyval, *yyvsp[0]) ;
     break;}      break;}
 case 97:  case 97:
 #line 441 "compile.y"  #line 444 "compile.y"
 {  {
         // we know that name_advance1 not called from ^xxx context          // we know that name_advance1 not called from ^xxx context
         // so we'll not check for operator call possibility as we do in name_advance2          // so we'll not check for operator call possibility as we do in name_advance2
   
         /* stack: context */          /* stack: context */
         yyval=yyvsp[0]; /* stack: context,name */          yyval=yyvsp[0]; /* stack: context,name */
         O(yyval, OP_GET_ELEMENT); /* name=pop; context=pop; stack: context.get_element(name) */          O(*yyval, OP_GET_ELEMENT); /* name=pop; context=pop; stack: context.get_element(name) */
 ;  ;
     break;}      break;}
 case 98:  case 98:
 #line 449 "compile.y"  #line 452 "compile.y"
 {  {
         /* stack: context */          /* stack: context */
         yyval=yyvsp[0]; /* stack: context,name */          yyval=yyvsp[0]; /* stack: context,name */
         O(yyval, OP_GET_ELEMENT); /* name=pop; context=pop; stack: context.get_element(name) */          O(*yyval, OP_GET_ELEMENT); /* name=pop; context=pop; stack: context.get_element(name) */
 ;  ;
     break;}      break;}
 case 104:  case 104:
 #line 462 "compile.y"  #line 465 "compile.y"
 {  {
         yyval=yyvsp[0];          yyval=yyvsp[0];
         O(yyval, OP_GET_ELEMENT);          O(*yyval, OP_GET_ELEMENT);
 ;  ;
     break;}      break;}
 case 105:  case 105:
 #line 466 "compile.y"  #line 469 "compile.y"
 {  {
         Array *code;          ArrayOperation* code;
         {          {
                 change_string_literal_to_write_string_literal(code=yyvsp[-1]);                  change_string_literal_to_write_string_literal(*(code=yyvsp[-1]));
                 P(code, yyvsp[0]);                  P(*code, *yyvsp[0]);
         }          }
         yyval=N(POOL);           yyval=N(); 
         OA(yyval, OP_STRING_POOL, code);          OA(*yyval, OP_STRING_POOL, code);
 ;  ;
     break;}      break;}
 case 106:  case 106:
 #line 475 "compile.y"  #line 478 "compile.y"
 {  {
         yyval=N(POOL);           yyval=N(); 
         OA(yyval, OP_OBJECT_POOL, yyvsp[-1]); /* stack: empty write context */          OA(*yyval, OP_OBJECT_POOL, yyvsp[-1]); /* stack: empty write context */
         /* some code that writes to that context */          /* some code that writes to that context */
         /* context=pop; stack: context.value() */          /* context=pop; stack: context.value() */
 ;  ;
     break;}      break;}
 case 107:  case 107:
 #line 481 "compile.y"  #line 484 "compile.y"
 {  {
         yyval=N(POOL);           yyval=N(); 
         O(yyval, OP_WITH_READ);          O(*yyval, OP_WITH_READ);
         P(yyval, yyvsp[0]);          P(*yyval, *yyvsp[0]);
 ;  ;
     break;}      break;}
 case 109:  case 109:
 #line 486 "compile.y"  #line 489 "compile.y"
 { yyval=yyvsp[-1]; P(yyval, yyvsp[0]) ;  { yyval=yyvsp[-1]; P(*yyval, *yyvsp[0]) ;
     break;}      break;}
 case 110:  case 110:
 #line 487 "compile.y"  #line 490 "compile.y"
 {  {
         yyval=yyvsp[0];          yyval=yyvsp[0];
         O(yyval, OP_GET_ELEMENT__WRITE);          O(*yyval, OP_GET_ELEMENT__WRITE);
 ;  ;
     break;}      break;}
 case 113:  case 113:
 #line 496 "compile.y"  #line 499 "compile.y"
 {  {
         yyval=yyvsp[-1]; // stack: class name string          yyval=yyvsp[-1]; // stack: class name string
         if(*LA2S(yyval) == BASE_NAME) { // pseude BASE class          if(*LA2S(*yyval) == BASE_NAME) { // pseude BASE class
                 if(VStateless_class *base=PC.cclass->base_class()) {                  if(VStateless_class* base=PC.cclass->base_class()) {
                         change_string_literal_value(yyval, base->name());                          change_string_literal_value(*yyval, base->name());
                 } else {                  } else {
                         strcpy(PC.error, "no base class declared");                          strcpy(PC.error, "no base class declared");
                         YYERROR;                          YYERROR;
                 }                  }
         }          }
         O(yyval, OP_GET_CLASS);          O(*yyval, OP_GET_CLASS);
 ;  ;
     break;}      break;}
 case 114:  case 114:
 #line 508 "compile.y"  #line 511 "compile.y"
 {  {
         yyval=yyvsp[-1];          yyval=yyvsp[-1];
         if(!PC.in_call_value) {          if(!PC.in_call_value) {
                 strcpy(PC.error, ":: not allowed here");                  strcpy(PC.error, ":: not allowed here");
                 YYERROR;                  YYERROR;
         }          }
         O(yyval, OP_PREPARE_TO_CONSTRUCT_OBJECT);          O(*yyval, OP_PREPARE_TO_CONSTRUCT_OBJECT);
 ;  ;
     break;}      break;}
 case 115:  case 115:
 #line 520 "compile.y"  #line 523 "compile.y"
 {  {
         // see OP_PREPARE_TO_EXPRESSION!!          // see OP_PREPARE_TO_EXPRESSION!!
         if((yyval=yyvsp[0])->size()==2) // only one string literal in there?          if((yyval=yyvsp[0])->count()==2) // only one string literal in there?
                 change_string_literal_to_double_literal(yyval); // make that string literal Double                  change_string_literal_to_double_literal(*yyval); // make that string literal Double
 ;  ;
     break;}      break;}
 case 119:  case 119:
 #line 529 "compile.y"  #line 532 "compile.y"
 { yyval = yyvsp[-1]; ;  { yyval = yyvsp[-1]; ;
     break;}      break;}
 case 120:  case 120:
 #line 530 "compile.y"  #line 533 "compile.y"
 { yyval = yyvsp[-1]; ;  { yyval = yyvsp[-1]; ;
     break;}      break;}
 case 121:  case 121:
 #line 531 "compile.y"  #line 534 "compile.y"
 { yyval = yyvsp[-1]; ;  { yyval = yyvsp[-1]; ;
     break;}      break;}
 case 122:  case 122:
 #line 533 "compile.y"  #line 536 "compile.y"
 { yyval=yyvsp[0];  O(yyval, OP_NEG) ;  { yyval=yyvsp[0];  O(*yyval, OP_NEG) ;
     break;}      break;}
 case 123:  case 123:
 #line 534 "compile.y"  #line 537 "compile.y"
 { yyval=yyvsp[0] ;  { yyval=yyvsp[0] ;
     break;}      break;}
 case 124:  case 124:
 #line 535 "compile.y"  #line 538 "compile.y"
 { yyval=yyvsp[0];        O(yyval, OP_INV) ;  { yyval=yyvsp[0];        O(*yyval, OP_INV) ;
     break;}      break;}
 case 125:  case 125:
 #line 536 "compile.y"  #line 539 "compile.y"
 { yyval=yyvsp[0];  O(yyval, OP_NOT) ;  { yyval=yyvsp[0];  O(*yyval, OP_NOT) ;
     break;}      break;}
 case 126:  case 126:
 #line 537 "compile.y"  #line 540 "compile.y"
 { yyval=yyvsp[0];  O(yyval, OP_DEF) ;  { yyval=yyvsp[0];  O(*yyval, OP_DEF) ;
     break;}      break;}
 case 127:  case 127:
 #line 538 "compile.y"  #line 541 "compile.y"
 { yyval=yyvsp[0];  O(yyval, OP_IN) ;  { yyval=yyvsp[0];  O(*yyval, OP_IN) ;
     break;}      break;}
 case 128:  case 128:
 #line 539 "compile.y"  #line 542 "compile.y"
 { yyval=yyvsp[0];  O(yyval, OP_FEXISTS) ;  { yyval=yyvsp[0];  O(*yyval, OP_FEXISTS) ;
     break;}      break;}
 case 129:  case 129:
 #line 540 "compile.y"  #line 543 "compile.y"
 { yyval=yyvsp[0];  O(yyval, OP_DEXISTS) ;  { yyval=yyvsp[0];  O(*yyval, OP_DEXISTS) ;
     break;}      break;}
 case 130:  case 130:
 #line 542 "compile.y"  #line 545 "compile.y"
 {       yyval=yyvsp[-2];  P(yyval, yyvsp[0]);  O(yyval, OP_SUB) ;  {       yyval=yyvsp[-2];  P(*yyval, *yyvsp[0]);  O(*yyval, OP_SUB) ;
     break;}      break;}
 case 131:  case 131:
 #line 543 "compile.y"  #line 546 "compile.y"
 { yyval=yyvsp[-2];  P(yyval, yyvsp[0]);  O(yyval, OP_ADD) ;  { yyval=yyvsp[-2];  P(*yyval, *yyvsp[0]);  O(*yyval, OP_ADD) ;
     break;}      break;}
 case 132:  case 132:
 #line 544 "compile.y"  #line 547 "compile.y"
 { yyval=yyvsp[-2];  P(yyval, yyvsp[0]);  O(yyval, OP_MUL) ;  { yyval=yyvsp[-2];  P(*yyval, *yyvsp[0]);  O(*yyval, OP_MUL) ;
     break;}      break;}
 case 133:  case 133:
 #line 545 "compile.y"  #line 548 "compile.y"
 { yyval=yyvsp[-2];  P(yyval, yyvsp[0]);  O(yyval, OP_DIV) ;  { yyval=yyvsp[-2];  P(*yyval, *yyvsp[0]);  O(*yyval, OP_DIV) ;
     break;}      break;}
 case 134:  case 134:
 #line 546 "compile.y"  #line 549 "compile.y"
 { yyval=yyvsp[-2];  P(yyval, yyvsp[0]);  O(yyval, OP_MOD) ;  { yyval=yyvsp[-2];  P(*yyval, *yyvsp[0]);  O(*yyval, OP_MOD) ;
     break;}      break;}
 case 135:  case 135:
 #line 547 "compile.y"  #line 550 "compile.y"
 { yyval=yyvsp[-2];  P(yyval, yyvsp[0]);  O(yyval, OP_INTDIV) ;  { yyval=yyvsp[-2];  P(*yyval, *yyvsp[0]);  O(*yyval, OP_INTDIV) ;
     break;}      break;}
 case 136:  case 136:
 #line 548 "compile.y"  #line 551 "compile.y"
 { yyval=yyvsp[-2];  P(yyval, yyvsp[0]);  O(yyval, OP_BIN_SL) ;  { yyval=yyvsp[-2];  P(*yyval, *yyvsp[0]);  O(*yyval, OP_BIN_SL) ;
     break;}      break;}
 case 137:  case 137:
 #line 549 "compile.y"  #line 552 "compile.y"
 { yyval=yyvsp[-2];  P(yyval, yyvsp[0]);  O(yyval, OP_BIN_SR) ;  { yyval=yyvsp[-2];  P(*yyval, *yyvsp[0]);  O(*yyval, OP_BIN_SR) ;
     break;}      break;}
 case 138:  case 138:
 #line 550 "compile.y"  #line 553 "compile.y"
 { yyval=yyvsp[-2];      P(yyval, yyvsp[0]);  O(yyval, OP_BIN_AND) ;  { yyval=yyvsp[-2];      P(*yyval, *yyvsp[0]);  O(*yyval, OP_BIN_AND) ;
     break;}      break;}
 case 139:  case 139:
 #line 551 "compile.y"  #line 554 "compile.y"
 { yyval=yyvsp[-2];  P(yyval, yyvsp[0]);  O(yyval, OP_BIN_OR) ;  { yyval=yyvsp[-2];  P(*yyval, *yyvsp[0]);  O(*yyval, OP_BIN_OR) ;
     break;}      break;}
 case 140:  case 140:
 #line 552 "compile.y"  #line 555 "compile.y"
 { yyval=yyvsp[-2];  P(yyval, yyvsp[0]);  O(yyval, OP_BIN_XOR) ;  { yyval=yyvsp[-2];  P(*yyval, *yyvsp[0]);  O(*yyval, OP_BIN_XOR) ;
     break;}      break;}
 case 141:  case 141:
 #line 553 "compile.y"  #line 556 "compile.y"
 { yyval=yyvsp[-2];  OA(yyval, OP_NESTED_CODE, yyvsp[0]);  O(yyval, OP_LOG_AND) ;  { yyval=yyvsp[-2];  OA(*yyval, OP_NESTED_CODE, yyvsp[0]);  O(*yyval, OP_LOG_AND) ;
     break;}      break;}
 case 142:  case 142:
 #line 554 "compile.y"  #line 557 "compile.y"
 { yyval=yyvsp[-2];  OA(yyval, OP_NESTED_CODE, yyvsp[0]);  O(yyval, OP_LOG_OR) ;  { yyval=yyvsp[-2];  OA(*yyval, OP_NESTED_CODE, yyvsp[0]);  O(*yyval, OP_LOG_OR) ;
     break;}      break;}
 case 143:  case 143:
 #line 555 "compile.y"  #line 558 "compile.y"
 { yyval=yyvsp[-2];  P(yyval, yyvsp[0]);  O(yyval, OP_LOG_XOR) ;  { yyval=yyvsp[-2];  P(*yyval, *yyvsp[0]);  O(*yyval, OP_LOG_XOR) ;
     break;}      break;}
 case 144:  case 144:
 #line 556 "compile.y"  #line 559 "compile.y"
 { yyval=yyvsp[-2];  P(yyval, yyvsp[0]);  O(yyval, OP_NUM_LT) ;  { yyval=yyvsp[-2];  P(*yyval, *yyvsp[0]);  O(*yyval, OP_NUM_LT) ;
     break;}      break;}
 case 145:  case 145:
 #line 557 "compile.y"  #line 560 "compile.y"
 { yyval=yyvsp[-2];  P(yyval, yyvsp[0]);  O(yyval, OP_NUM_GT) ;  { yyval=yyvsp[-2];  P(*yyval, *yyvsp[0]);  O(*yyval, OP_NUM_GT) ;
     break;}      break;}
 case 146:  case 146:
 #line 558 "compile.y"  #line 561 "compile.y"
 { yyval=yyvsp[-2];  P(yyval, yyvsp[0]);  O(yyval, OP_NUM_LE) ;  { yyval=yyvsp[-2];  P(*yyval, *yyvsp[0]);  O(*yyval, OP_NUM_LE) ;
     break;}      break;}
 case 147:  case 147:
 #line 559 "compile.y"  #line 562 "compile.y"
 { yyval=yyvsp[-2];  P(yyval, yyvsp[0]);  O(yyval, OP_NUM_GE) ;  { yyval=yyvsp[-2];  P(*yyval, *yyvsp[0]);  O(*yyval, OP_NUM_GE) ;
     break;}      break;}
 case 148:  case 148:
 #line 560 "compile.y"  #line 563 "compile.y"
 { yyval=yyvsp[-2];  P(yyval, yyvsp[0]);  O(yyval, OP_NUM_EQ) ;  { yyval=yyvsp[-2];  P(*yyval, *yyvsp[0]);  O(*yyval, OP_NUM_EQ) ;
     break;}      break;}
 case 149:  case 149:
 #line 561 "compile.y"  #line 564 "compile.y"
 { yyval=yyvsp[-2];  P(yyval, yyvsp[0]);  O(yyval, OP_NUM_NE) ;  { yyval=yyvsp[-2];  P(*yyval, *yyvsp[0]);  O(*yyval, OP_NUM_NE) ;
     break;}      break;}
 case 150:  case 150:
 #line 562 "compile.y"  #line 565 "compile.y"
 { yyval=yyvsp[-2];  P(yyval, yyvsp[0]);  O(yyval, OP_STR_LT) ;  { yyval=yyvsp[-2];  P(*yyval, *yyvsp[0]);  O(*yyval, OP_STR_LT) ;
     break;}      break;}
 case 151:  case 151:
 #line 563 "compile.y"  #line 566 "compile.y"
 { yyval=yyvsp[-2];  P(yyval, yyvsp[0]);  O(yyval, OP_STR_GT) ;  { yyval=yyvsp[-2];  P(*yyval, *yyvsp[0]);  O(*yyval, OP_STR_GT) ;
     break;}      break;}
 case 152:  case 152:
 #line 564 "compile.y"  #line 567 "compile.y"
 { yyval=yyvsp[-2];  P(yyval, yyvsp[0]);  O(yyval, OP_STR_LE) ;  { yyval=yyvsp[-2];  P(*yyval, *yyvsp[0]);  O(*yyval, OP_STR_LE) ;
     break;}      break;}
 case 153:  case 153:
 #line 565 "compile.y"  #line 568 "compile.y"
 { yyval=yyvsp[-2];  P(yyval, yyvsp[0]);  O(yyval, OP_STR_GE) ;  { yyval=yyvsp[-2];  P(*yyval, *yyvsp[0]);  O(*yyval, OP_STR_GE) ;
     break;}      break;}
 case 154:  case 154:
 #line 566 "compile.y"  #line 569 "compile.y"
 { yyval=yyvsp[-2];  P(yyval, yyvsp[0]);  O(yyval, OP_STR_EQ) ;  { yyval=yyvsp[-2];  P(*yyval, *yyvsp[0]);  O(*yyval, OP_STR_EQ) ;
     break;}      break;}
 case 155:  case 155:
 #line 567 "compile.y"  #line 570 "compile.y"
 { yyval=yyvsp[-2];  P(yyval, yyvsp[0]);  O(yyval, OP_STR_NE) ;  { yyval=yyvsp[-2];  P(*yyval, *yyvsp[0]);  O(*yyval, OP_STR_NE) ;
     break;}      break;}
 case 156:  case 156:
 #line 568 "compile.y"  #line 571 "compile.y"
 { yyval=yyvsp[-2];  P(yyval, yyvsp[0]);  O(yyval, OP_IS) ;  { yyval=yyvsp[-2];  P(*yyval, *yyvsp[0]);  O(*yyval, OP_IS) ;
     break;}      break;}
 case 157:  case 157:
 #line 571 "compile.y"  #line 574 "compile.y"
 {  {
         yyval=N(POOL);          yyval=N();
         OA(yyval, OP_STRING_POOL, yyvsp[0]); /* stack: empty write context */          OA(*yyval, OP_STRING_POOL, yyvsp[0]); /* stack: empty write context */
         /* some code that writes to that context */          /* some code that writes to that context */
         /* context=pop; stack: context.get_string() */          /* context=pop; stack: context.get_string() */
 ;  ;
     break;}      break;}
 case 158:  case 158:
 #line 580 "compile.y"  #line 583 "compile.y"
 {  {
         // optimized from OP_STRING+OP_WRITE_VALUE to OP_STRING__WRITE          // optimized from OP_STRING+OP_WRITE_VALUE to OP_STRING__WRITE
         change_string_literal_to_write_string_literal(yyval=yyvsp[0])          change_string_literal_to_write_string_literal(*(yyval=yyvsp[0]))
 ;  ;
     break;}      break;}
 case 159:  case 159:
 #line 585 "compile.y"  #line 588 "compile.y"
 { yyval=VL(NEW VVoid(POOL)) ;  { yyval=VL(new VVoid()) ;
     break;}      break;}
 case 160:  case 160:
 #line 586 "compile.y"  #line 589 "compile.y"
 { yyval=N(POOL) ;  { yyval=N() ;
     break;}      break;}
 }  }
    /* the action file gets copied in in place of this dollarsign */     /* the action file gets copied in in place of this dollarsign */
Line 1887  yyerrhandle: Line 1890  yyerrhandle:
     }      }
   return 1;    return 1;
 }  }
 #line 588 "compile.y"  #line 591 "compile.y"
   
 #endif  #endif
   
Line 1976  default: Line 1979  default:
                         case '"':  case ':':                          case '"':  case ':':
                                 if(end!=begin) {                                  if(end!=begin) {
                                         // append piece till ^                                          // append piece till ^
                                         PC.string->APPEND_CLEAN(begin, end-begin, PC.file, begin_line);                                          PC.string.append_strdup(begin, end-begin);
                                 }                                  }
                                 // reset piece 'begin' position & line                                  // reset piece 'begin' position & line
                                 begin=PC.source; // ->punctuation                                  begin=PC.source; // ->punctuation
Line 1990  default: Line 1993  default:
                         case '#':                          case '#':
                                 if(end!=begin) {                                  if(end!=begin) {
                                         // append piece till ^                                          // append piece till ^
                                         PC.string->APPEND_CLEAN(begin, end-begin, PC.file, begin_line);                                          PC.string.append_strdup(begin, end-begin);
                                 }                                  }
                                 // #HH ?                                  // #HH ?
                                 if(PC.source[0]=='#' && PC.source[1] && PC.source[2]) {                                  if(PC.source[0]=='#' && PC.source[1] && PC.source[2]) {
                                         char *hex=(char *)POOL.malloc(1);                                          char c=
                                         hex[0]=  
                                                 hex_value[(unsigned char)PC.source[1]]*0x10+                                                  hex_value[(unsigned char)PC.source[1]]*0x10+
                                                 hex_value[(unsigned char)PC.source[2]];                                                  hex_value[(unsigned char)PC.source[2]];
                                         if(hex[0]==0) {                                          if(c==0) {
                                                 result=BAD_HEX_LITERAL;                                                  result=BAD_HEX_LITERAL;
                                                 goto break2; // wrong hex value[no ^#00 chars allowed]: bail out                                                  goto break2; // wrong hex value[no ^#00 chars allowed]: bail out
                                         }                                          }
                                         // append char(hex(HH))                                          // append char(hex(HH))
                                         PC.string->APPEND_CLEAN(hex, 1, PC.file, begin_line);                                          PC.string.append(c);
                                         // skip over ^#HH                                          // skip over ^#HH
                                         PC.source+=3;                                          PC.source+=3;
                                         PC.col+=3;                                          PC.col+=3;
Line 2022  default: Line 2024  default:
                 if(c=='#' && PC.col==1) {                  if(c=='#' && PC.col==1) {
                         if(end!=begin) {                          if(end!=begin) {
                                 // append piece till #                                  // append piece till #
                                 PC.string->APPEND_CLEAN(begin, end-begin, PC.file, begin_line);                                  PC.string.append_strdup(begin, end-begin);
                         }                          }
                         // fall into COMMENT lexical state [wait for \n]                          // fall into COMMENT lexical state [wait for \n]
                         push_LS(PC, LS_USER_COMMENT);                          push_LS(PC, LS_USER_COMMENT);
Line 2165  default: Line 2167  default:
                         case '#': // comment start skipping                          case '#': // comment start skipping
                                 if(end!=begin) {                                  if(end!=begin) {
                                         // append piece till #                                          // append piece till #
                                         PC.string->APPEND_CLEAN(begin, end-begin, PC.file, begin_line);                                          PC.string.append_strdup(begin, end-begin);
                                 }                                  }
                                 // fall into COMMENT lexical state [wait for \n]                                  // fall into COMMENT lexical state [wait for \n]
                                 push_LS(PC, LS_EXPRESSION_COMMENT);                                  push_LS(PC, LS_EXPRESSION_COMMENT);
Line 2597  break2: Line 2599  break2:
                 }                  }
                 if(end!=begin && PC.ls!=LS_USER_COMMENT) { // last piece still alive and not comment?                  if(end!=begin && PC.ls!=LS_USER_COMMENT) { // last piece still alive and not comment?
                         // append it                          // append it
                         PC.string->APPEND_CLEAN(begin, end-begin, PC.file, begin_line/*, start_col*/);                          PC.string.append_strdup(begin, end-begin);
                 }                  }
         }          }
         if(PC.string->size()) { // something accumulated?          if(!PC.string.is_empty()) { // something accumulated?
                 // create STRING value: array of OP_VALUE+vstring                  // create STRING value: array of OP_VALUE+vstring
                 *lvalp=VL(NEW VString(*PC.string));                  *lvalp=VL(new VString(*new String(PC.string, String::L_CLEAN)));
                 // new pieces storage                  // new pieces storage
                 PC.string=NEW String(POOL);                  PC.string.clear();
                 // make current result be pending for next call, return STRING for now                  // make current result be pending for next call, return STRING for now
                 PC.pending_state=result;  result=STRING;                  PC.pending_state=result;  result=STRING;
         }          }
Line 2621  static int real_yyerror(parse_control *p Line 2623  static int real_yyerror(parse_control *p
   
 static void yyprint(FILE *file, int type, YYSTYPE value) {  static void yyprint(FILE *file, int type, YYSTYPE value) {
         if(type==STRING)          if(type==STRING)
                 fprintf(file, " \"%s\"", LA2S(value)->cstr());                  fprintf(file, " \"%s\"", LA2S(*value)->cstr());
 }  }

Removed from v.1.75.4.1  
changed lines
  Added in v.1.81.2.13.2.19


E-mail: