stage4/generate_iec/generate_iec.cc
changeset 919 8da635655f37
parent 909 8b2a31dea131
child 921 d228aaa4d616
equal deleted inserted replaced
918:e9bde0aa93ed 919:8da635655f37
   256 void *visit(identifier_c *symbol) {return print_token(symbol);}
   256 void *visit(identifier_c *symbol) {return print_token(symbol);}
   257 
   257 
   258 /*********************/
   258 /*********************/
   259 /* B 1.2 - Constants */
   259 /* B 1.2 - Constants */
   260 /*********************/
   260 /*********************/
       
   261 /*********************************/
       
   262 /* B 1.2.XX - Reference Literals */
       
   263 /*********************************/
       
   264 /* defined in IEC 61131-3 v3 - Basically the 'NULL' keyword! */
       
   265 void *visit(ref_value_null_literal_c *symbol)  {s4o.print("NULL"); return NULL;}
   261 
   266 
   262 /******************************/
   267 /******************************/
   263 /* B 1.2.1 - Numeric Literals */
   268 /* B 1.2.1 - Numeric Literals */
   264 /******************************/
   269 /******************************/
   265 void *visit(real_c *symbol)               {return print_token(symbol);}
   270 void *visit(real_c *symbol)               {return print_token(symbol);}
   274 void *visit(real_literal_c *symbol)       {return print_literal(symbol->type, symbol->value);}
   279 void *visit(real_literal_c *symbol)       {return print_literal(symbol->type, symbol->value);}
   275 void *visit(bit_string_literal_c *symbol) {return print_literal(symbol->type, symbol->value);}
   280 void *visit(bit_string_literal_c *symbol) {return print_literal(symbol->type, symbol->value);}
   276 void *visit(boolean_literal_c *symbol)    {return print_literal(symbol->type, symbol->value);}
   281 void *visit(boolean_literal_c *symbol)    {return print_literal(symbol->type, symbol->value);}
   277 
   282 
   278 /* helper class for boolean_literal_c */
   283 /* helper class for boolean_literal_c */
   279 void *visit(boolean_true_c *symbol)       {s4o.print(/*"TRUE"*/"1"); return NULL;}
   284 void *visit(boolean_true_c *symbol)       {s4o.print(/*"TRUE" */"1"); return NULL;}
   280 void *visit(boolean_false_c *symbol)      {s4o.print(/*"FALSE"*/"0"); return NULL;}
   285 void *visit(boolean_false_c *symbol)      {s4o.print(/*"FALSE"*/"0"); return NULL;}
   281 
   286 
   282 /*******************************/
   287 /*******************************/
   283 /* B.1.2.2   Character Strings */
   288 /* B.1.2.2   Character Strings */
   284 /*******************************/
   289 /*******************************/