Fix bug in PLC Generator preventing output type of standard function to be computed correctly
authorLaurent Bessard
Wed, 05 Dec 2012 15:32:02 +0100
changeset 893 f528c421637b
parent 892 771581a6b0be
child 894 a4919f228924
Fix bug in PLC Generator preventing output type of standard function to be computed correctly
PLCGenerator.py
--- a/PLCGenerator.py	Mon Dec 03 23:38:23 2012 +0100
+++ b/PLCGenerator.py	Wed Dec 05 15:32:02 2012 +0100
@@ -75,9 +75,6 @@
     else:
         return cmp(ay, by)
 
-REAL_MODEL = re.compile("[0-9]+\.[0-9]+$")
-INTEGER_MODEL = re.compile("[0-9]+$")
-
 #-------------------------------------------------------------------------------
 #                  Specific exception for PLC generating errors
 #-------------------------------------------------------------------------------
@@ -685,10 +682,6 @@
                         parts = expression.split("#")
                         if len(parts) > 1:
                             var_type = parts[0]
-                        elif REAL_MODEL.match(expression):
-                            var_type = "ANY_REAL"
-                        elif INTEGER_MODEL.match(expression):
-                            var_type = "ANY_NUM"
                         elif expression.startswith("'"):
                             var_type = "STRING"
                         elif expression.startswith('"'):