# HG changeset patch # User etisserant # Date 1184752656 -7200 # Node ID 4a7e80513edd035b6cae1714c075fd7dfd7d579f # Parent 4a8400732001929000e90fef417131106e327cc7 Test IEC_LIB and fix bugs (EQ, GT et all) diff -r 4a8400732001 -r 4a7e80513edd generate_IEC_std.py --- a/generate_IEC_std.py Wed Jul 18 11:51:30 2007 +0200 +++ b/generate_IEC_std.py Wed Jul 18 11:57:36 2007 +0200 @@ -113,6 +113,7 @@ code_gen_dic_decl[paramname+"_type"] = '");\n%s_type_symbol->accept(*this);\ns4o.print("'%(paramname) code_gen_dic_decl["return_type"] = '");\nreturn_type_symbol->accept(*this);\ns4o.print("' code_gen_dic_decl["param_count"] = '");\ns4o.print_integer(nb_param);\ns4o.print("' + code_gen_dic_decl["common_type"] = '");\nlast_type_symbol->accept(*this);\ns4o.print("' code_gen_dic_decl["start_bool_filter"] = '");\nif (search_expression_type->is_bool_type(last_type_symbol))\n s4o.print("(' code_gen_dic_decl["end_bool_filter"] = '");\nif (search_expression_type->is_bool_type(last_type_symbol)) {\n s4o.print("&1");\n s4o.print(")");\n}\ns4o.print("' diff -r 4a8400732001 -r 4a7e80513edd plcopen/iec_std.csv --- a/plcopen/iec_std.csv Wed Jul 18 11:51:30 2007 +0200 +++ b/plcopen/iec_std.csv Wed Jul 18 11:57:36 2007 +0200 @@ -61,12 +61,12 @@ ;MIN;1;(ANY, ANY);ANY;Minimum;yes;("__min_%(return_type)s(%(param_count)s,",",",")");copy_input ;LIMIT;1;(MN, ANY, MX);ANY;Limitation;no;"__limit_%(IN_type)s(%(MN_value)s, %(IN_value)s, %(MX_value)s)";IN_type_symbol ;MUX;0;(K, ANY, ANY);ANY;Multiplexer (select 1 of N);yes;("__mux_%(return_type)s(%(param_count)s,",",",")");copy_input -Comparison;GT;1;(ANY, ANY);BOOL;Greater than;yes;("__gt_%(return_type)s(%(param_count)s,",",",")");defined -;GE;1;(ANY, ANY);BOOL;Greater than or equal to;yes;("__ge_%(return_type)s(%(param_count)s,",",",")");defined -;EQ;1;(ANY, ANY);BOOL;Equal to;yes;("__eq_%(return_type)s(%(param_count)s,",",",")");defined -;LT;1;(ANY, ANY);BOOL;Less than;yes;("__lt_%(return_type)s(%(param_count)s,",",",")");defined -;LE;1;(ANY, ANY);BOOL;Less than or equal to;yes;("__le_%(return_type)s(%(param_count)s,",",",")");defined -;NE;1;(ANY, ANY);BOOL;Not equal to;yes;("__ne_%(return_type)s(%(param_count)s,",",",")");defined +Comparison;GT;1;(ANY, ANY);BOOL;Greater than;yes;("__gt_%(common_type)s(%(param_count)s,",",",")");defined +;GE;1;(ANY, ANY);BOOL;Greater than or equal to;yes;("__ge_%(common_type)s(%(param_count)s,",",",")");defined +;EQ;1;(ANY, ANY);BOOL;Equal to;yes;("__eq_%(common_type)s(%(param_count)s,",",",")");defined +;LT;1;(ANY, ANY);BOOL;Less than;yes;("__lt_%(common_type)s(%(param_count)s,",",",")");defined +;LE;1;(ANY, ANY);BOOL;Less than or equal to;yes;("__le_%(common_type)s(%(param_count)s,",",",")");defined +;NE;1;(ANY, ANY);BOOL;Not equal to;yes;("__ne_%(common_type)s(%(param_count)s,",",",")");defined Character string;LEN;1;(STRING);INT;Length of string;no;"__len(%(IN_value)s)";defined ;LEFT;1;(STRING, L);STRING;string left of;no;"__left(%(IN_value)s, %(L_value)s)";defined ;RIGHT;1;(STRING, L);STRING;string right of;no;"__right(%(IN_value)s, %(L_value)s)";defined