# HG changeset patch
# User Edouard Tisserant
# Date 1302009259 -7200
# Node ID c0453b7f99df19310b26fb6fd982655c9c03f354
# Parent 050d31dd7c7490ffcdc7f6286323f4012172e1fb
Re-generated std lib related code, with updated headers, updated all forgotten headers
diff -r 050d31dd7c74 -r c0453b7f99df Makefile
--- a/Makefile Mon Apr 04 19:18:22 2011 +0200
+++ b/Makefile Tue Apr 05 15:14:19 2011 +0200
@@ -1,3 +1,21 @@
+# matiec - a compiler for the programming languages defined in IEC 61131-3
+#
+# Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+# Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
# include the system specific Makefile
include Makefile.$(shell uname)
diff -r 050d31dd7c74 -r c0453b7f99df Makefile.CYGWIN_NT-5.1
--- a/Makefile.CYGWIN_NT-5.1 Mon Apr 04 19:18:22 2011 +0200
+++ b/Makefile.CYGWIN_NT-5.1 Tue Apr 05 15:14:19 2011 +0200
@@ -1,4 +1,21 @@
-#CXX = i686-mingw32-c++
+# matiec - a compiler for the programming languages defined in IEC 61131-3
+#
+# Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+# Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
CXX = g++ -mno-cygwin
#get warnings, debugging information and optimization
diff -r 050d31dd7c74 -r c0453b7f99df Makefile.CYGWIN_NT-6.0
--- a/Makefile.CYGWIN_NT-6.0 Mon Apr 04 19:18:22 2011 +0200
+++ b/Makefile.CYGWIN_NT-6.0 Tue Apr 05 15:14:19 2011 +0200
@@ -1,3 +1,21 @@
+# matiec - a compiler for the programming languages defined in IEC 61131-3
+#
+# Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+# Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
#CXX = i686-mingw32-c++
CXX = g++ -mno-cygwin
@@ -14,4 +32,4 @@
#CXXFLAGS += -O3 -funroll-loops
CXXFLAGS = $(CFLAGS)
-IECLIBDIR=lib
\ No newline at end of file
+IECLIBDIR=lib
diff -r 050d31dd7c74 -r c0453b7f99df Makefile.Darwin
--- a/Makefile.Darwin Mon Apr 04 19:18:22 2011 +0200
+++ b/Makefile.Darwin Tue Apr 05 15:14:19 2011 +0200
@@ -1,4 +1,21 @@
-#CXX = i686-mingw32-c++
+# matiec - a compiler for the programming languages defined in IEC 61131-3
+#
+# Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+# Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
CXX = g++
#get warnings, debugging information and optimization
diff -r 050d31dd7c74 -r c0453b7f99df Makefile.Linux
--- a/Makefile.Linux Mon Apr 04 19:18:22 2011 +0200
+++ b/Makefile.Linux Tue Apr 05 15:14:19 2011 +0200
@@ -1,3 +1,21 @@
+# matiec - a compiler for the programming languages defined in IEC 61131-3
+#
+# Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+# Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
#CXX = i686-mingw32-c++
CXX = g++
diff -r 050d31dd7c74 -r c0453b7f99df Makefile.MINGW32_NT-5.1
--- a/Makefile.MINGW32_NT-5.1 Mon Apr 04 19:18:22 2011 +0200
+++ b/Makefile.MINGW32_NT-5.1 Tue Apr 05 15:14:19 2011 +0200
@@ -1,3 +1,21 @@
+# matiec - a compiler for the programming languages defined in IEC 61131-3
+#
+# Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+# Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
#CXX = i686-mingw32-c++
CXX = g++
@@ -14,4 +32,4 @@
#CXXFLAGS += -O3 -funroll-loops
CXXFLAGS = $(CFLAGS)
-IECLIBDIR=lib
\ No newline at end of file
+IECLIBDIR=lib
diff -r 050d31dd7c74 -r c0453b7f99df absyntax/Makefile
--- a/absyntax/Makefile Mon Apr 04 19:18:22 2011 +0200
+++ b/absyntax/Makefile Tue Apr 05 15:14:19 2011 +0200
@@ -1,3 +1,21 @@
+# matiec - a compiler for the programming languages defined in IEC 61131-3
+#
+# Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+# Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
# include the system specific Makefile
include ../Makefile.$(shell uname)
diff -r 050d31dd7c74 -r c0453b7f99df absyntax/absyntax.cc
--- a/absyntax/absyntax.cc Mon Apr 04 19:18:22 2011 +0200
+++ b/absyntax/absyntax.cc Tue Apr 05 15:14:19 2011 +0200
@@ -1,6 +1,7 @@
/*
* matiec - a compiler for the programming languages defined in IEC 61131-3
* Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df absyntax/absyntax.def
--- a/absyntax/absyntax.def Mon Apr 04 19:18:22 2011 +0200
+++ b/absyntax/absyntax.def Tue Apr 05 15:14:19 2011 +0200
@@ -1,6 +1,7 @@
/*
* matiec - a compiler for the programming languages defined in IEC 61131-3
* Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df absyntax/absyntax.hh
--- a/absyntax/absyntax.hh Mon Apr 04 19:18:22 2011 +0200
+++ b/absyntax/absyntax.hh Tue Apr 05 15:14:19 2011 +0200
@@ -1,6 +1,7 @@
/*
* matiec - a compiler for the programming languages defined in IEC 61131-3
* Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df absyntax/visitor.cc
--- a/absyntax/visitor.cc Mon Apr 04 19:18:22 2011 +0200
+++ b/absyntax/visitor.cc Tue Apr 05 15:14:19 2011 +0200
@@ -1,6 +1,7 @@
/*
* matiec - a compiler for the programming languages defined in IEC 61131-3
* Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df absyntax/visitor.hh
--- a/absyntax/visitor.hh Mon Apr 04 19:18:22 2011 +0200
+++ b/absyntax/visitor.hh Tue Apr 05 15:14:19 2011 +0200
@@ -1,6 +1,7 @@
/*
* matiec - a compiler for the programming languages defined in IEC 61131-3
* Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df absyntax_utils/Makefile
--- a/absyntax_utils/Makefile Mon Apr 04 19:18:22 2011 +0200
+++ b/absyntax_utils/Makefile Tue Apr 05 15:14:19 2011 +0200
@@ -1,9 +1,24 @@
+# matiec - a compiler for the programming languages defined in IEC 61131-3
+#
+# Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+# Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
# include the system specific Makefile
include ../Makefile.$(shell uname)
-
-
-
SEARCH_UTIL_FILES = absyntax_utils.o
SEARCH_UTIL_FILES += search_expression_type.o
SEARCH_UTIL_FILES += decompose_var_instance_name.o
@@ -23,21 +38,15 @@
SEARCH_UTIL_FILES += get_sizeof_datatype.o
SEARCH_UTIL_FILES += get_function_type.o
-
default: all
all: $(SEARCH_UTIL_FILES)
-
-
clean:
rm -f *.o Makefile.depend
-
CXXFLAGS += -I. -I../*
-
-
Makefile.depend depend:
$(CXX) -MM -MG -I. *.cc \
| sed 's/:/ Makefile.depend:/' > Makefile.depend
diff -r 050d31dd7c74 -r c0453b7f99df absyntax_utils/absyntax_utils.cc
--- a/absyntax_utils/absyntax_utils.cc Mon Apr 04 19:18:22 2011 +0200
+++ b/absyntax_utils/absyntax_utils.cc Tue Apr 05 15:14:19 2011 +0200
@@ -2,6 +2,7 @@
* matiec - a compiler for the programming languages defined in IEC 61131-3
*
* Copyright (C) 2009-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df absyntax_utils/absyntax_utils.hh
--- a/absyntax_utils/absyntax_utils.hh Mon Apr 04 19:18:22 2011 +0200
+++ b/absyntax_utils/absyntax_utils.hh Tue Apr 05 15:14:19 2011 +0200
@@ -2,6 +2,7 @@
* matiec - a compiler for the programming languages defined in IEC 61131-3
*
* Copyright (C) 2009-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df absyntax_utils/add_en_eno_param_decl.cc
--- a/absyntax_utils/add_en_eno_param_decl.cc Mon Apr 04 19:18:22 2011 +0200
+++ b/absyntax_utils/add_en_eno_param_decl.cc Tue Apr 05 15:14:19 2011 +0200
@@ -2,6 +2,7 @@
* matiec - a compiler for the programming languages defined in IEC 61131-3
*
* Copyright (C) 2009-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df absyntax_utils/add_en_eno_param_decl.hh
--- a/absyntax_utils/add_en_eno_param_decl.hh Mon Apr 04 19:18:22 2011 +0200
+++ b/absyntax_utils/add_en_eno_param_decl.hh Tue Apr 05 15:14:19 2011 +0200
@@ -2,6 +2,7 @@
* matiec - a compiler for the programming languages defined in IEC 61131-3
*
* Copyright (C) 2009-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df absyntax_utils/decompose_var_instance_name.cc
--- a/absyntax_utils/decompose_var_instance_name.cc Mon Apr 04 19:18:22 2011 +0200
+++ b/absyntax_utils/decompose_var_instance_name.cc Tue Apr 05 15:14:19 2011 +0200
@@ -2,6 +2,7 @@
* matiec - a compiler for the programming languages defined in IEC 61131-3
*
* Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df absyntax_utils/decompose_var_instance_name.hh
--- a/absyntax_utils/decompose_var_instance_name.hh Mon Apr 04 19:18:22 2011 +0200
+++ b/absyntax_utils/decompose_var_instance_name.hh Tue Apr 05 15:14:19 2011 +0200
@@ -2,6 +2,7 @@
* matiec - a compiler for the programming languages defined in IEC 61131-3
*
* Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df absyntax_utils/function_call_iterator.cc
--- a/absyntax_utils/function_call_iterator.cc Mon Apr 04 19:18:22 2011 +0200
+++ b/absyntax_utils/function_call_iterator.cc Tue Apr 05 15:14:19 2011 +0200
@@ -2,6 +2,7 @@
* matiec - a compiler for the programming languages defined in IEC 61131-3
*
* Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df absyntax_utils/function_call_iterator.hh
--- a/absyntax_utils/function_call_iterator.hh Mon Apr 04 19:18:22 2011 +0200
+++ b/absyntax_utils/function_call_iterator.hh Tue Apr 05 15:14:19 2011 +0200
@@ -2,6 +2,7 @@
* matiec - a compiler for the programming languages defined in IEC 61131-3
*
* Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df absyntax_utils/function_call_param_iterator.cc
--- a/absyntax_utils/function_call_param_iterator.cc Mon Apr 04 19:18:22 2011 +0200
+++ b/absyntax_utils/function_call_param_iterator.cc Tue Apr 05 15:14:19 2011 +0200
@@ -2,6 +2,7 @@
* matiec - a compiler for the programming languages defined in IEC 61131-3
*
* Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df absyntax_utils/function_call_param_iterator.hh
--- a/absyntax_utils/function_call_param_iterator.hh Mon Apr 04 19:18:22 2011 +0200
+++ b/absyntax_utils/function_call_param_iterator.hh Tue Apr 05 15:14:19 2011 +0200
@@ -2,6 +2,7 @@
* matiec - a compiler for the programming languages defined in IEC 61131-3
*
* Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df absyntax_utils/function_param_iterator.cc
--- a/absyntax_utils/function_param_iterator.cc Mon Apr 04 19:18:22 2011 +0200
+++ b/absyntax_utils/function_param_iterator.cc Tue Apr 05 15:14:19 2011 +0200
@@ -2,6 +2,7 @@
* matiec - a compiler for the programming languages defined in IEC 61131-3
*
* Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df absyntax_utils/function_param_iterator.hh
--- a/absyntax_utils/function_param_iterator.hh Mon Apr 04 19:18:22 2011 +0200
+++ b/absyntax_utils/function_param_iterator.hh Tue Apr 05 15:14:19 2011 +0200
@@ -2,6 +2,7 @@
* matiec - a compiler for the programming languages defined in IEC 61131-3
*
* Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df absyntax_utils/function_type_decl.h
--- a/absyntax_utils/function_type_decl.h Mon Apr 04 19:18:22 2011 +0200
+++ b/absyntax_utils/function_type_decl.h Tue Apr 05 15:14:19 2011 +0200
@@ -1,32 +1,20 @@
/*
- * matiec - a compiler for the programming languages defined in IEC 61131-3
+ * Copyright (C) 2007-2011: Edouard TISSERANT and Laurent BESSARD
*
- * Copyright (C) 2008 Edouard TISSERANT
+ * See COPYING and COPYING.LESSER files for copyright details.
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- *
- *
- * This code is made available on the understanding that it will not be
- * used in safety-critical situations without a full and competent review.
- */
-
-
-/*
- * An IEC 61131-3 IL and ST compiler.
- *
- * Based on the
- * FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10)
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*
*/
@@ -424,9 +412,19 @@
function_acos,
function_atan,
function_add,
+ function_add_time,
+ function_add_tod_time,
+ function_add_dt_time,
function_mul,
+ function_multime,
function_sub,
+ function_sub_time,
+ function_sub_date_date,
+ function_sub_tod_time,
+ function_sub_tod_tod,
+ function_sub_dt_time,
function_div,
+ function_divtime,
function_mod,
function_expt,
function_move,
@@ -454,6 +452,7 @@
function_right,
function_mid,
function_concat,
+ function_concat_dat_tod,
function_insert,
function_delete,
function_replace,
diff -r 050d31dd7c74 -r c0453b7f99df absyntax_utils/get_function_type.cc
--- a/absyntax_utils/get_function_type.cc Mon Apr 04 19:18:22 2011 +0200
+++ b/absyntax_utils/get_function_type.cc Tue Apr 05 15:14:19 2011 +0200
@@ -1,7 +1,8 @@
/*
* matiec - a compiler for the programming languages defined in IEC 61131-3
*
- * Copyright (C) 2008 Edouard TISSERANT
+ * Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df absyntax_utils/get_function_type_decl.c
--- a/absyntax_utils/get_function_type_decl.c Mon Apr 04 19:18:22 2011 +0200
+++ b/absyntax_utils/get_function_type_decl.c Tue Apr 05 15:14:19 2011 +0200
@@ -1,32 +1,20 @@
/*
- * matiec - a compiler for the programming languages defined in IEC 61131-3
+ * Copyright (C) 2007-2011: Edouard TISSERANT and Laurent BESSARD
*
- * Copyright (C) 2008 Edouard TISSERANT
+ * See COPYING and COPYING.LESSER files for copyright details.
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- *
- *
- * This code is made available on the understanding that it will not be
- * used in safety-critical situations without a full and competent review.
- */
-
-
-/*
- * An IEC 61131-3 IL and ST compiler.
- *
- * Based on the
- * FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10)
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*
*/
@@ -1199,15 +1187,45 @@
if (!strcasecmp(function_name->value, "ADD"))
return function_add;
+if (!strcasecmp(function_name->value, "ADD_TIME"))
+ return function_add_time;
+
+if (!strcasecmp(function_name->value, "ADD_TOD_TIME"))
+ return function_add_tod_time;
+
+if (!strcasecmp(function_name->value, "ADD_DT_TIME"))
+ return function_add_dt_time;
+
if (!strcasecmp(function_name->value, "MUL"))
return function_mul;
+if (!strcasecmp(function_name->value, "MULTIME"))
+ return function_multime;
+
if (!strcasecmp(function_name->value, "SUB"))
return function_sub;
+if (!strcasecmp(function_name->value, "SUB_TIME"))
+ return function_sub_time;
+
+if (!strcasecmp(function_name->value, "SUB_DATE_DATE"))
+ return function_sub_date_date;
+
+if (!strcasecmp(function_name->value, "SUB_TOD_TIME"))
+ return function_sub_tod_time;
+
+if (!strcasecmp(function_name->value, "SUB_TOD_TOD"))
+ return function_sub_tod_tod;
+
+if (!strcasecmp(function_name->value, "SUB_DT_TIME"))
+ return function_sub_dt_time;
+
if (!strcasecmp(function_name->value, "DIV"))
return function_div;
+if (!strcasecmp(function_name->value, "DIVTIME"))
+ return function_divtime;
+
if (!strcasecmp(function_name->value, "MOD"))
return function_mod;
@@ -1289,6 +1307,9 @@
if (!strcasecmp(function_name->value, "CONCAT"))
return function_concat;
+if (!strcasecmp(function_name->value, "CONCAT_DAT_TOD"))
+ return function_concat_dat_tod;
+
if (!strcasecmp(function_name->value, "INSERT"))
return function_insert;
diff -r 050d31dd7c74 -r c0453b7f99df absyntax_utils/get_sizeof_datatype.cc
--- a/absyntax_utils/get_sizeof_datatype.cc Mon Apr 04 19:18:22 2011 +0200
+++ b/absyntax_utils/get_sizeof_datatype.cc Tue Apr 05 15:14:19 2011 +0200
@@ -2,6 +2,7 @@
* matiec - a compiler for the programming languages defined in IEC 61131-3
*
* Copyright (C) 2009-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df absyntax_utils/get_sizeof_datatype.hh
--- a/absyntax_utils/get_sizeof_datatype.hh Mon Apr 04 19:18:22 2011 +0200
+++ b/absyntax_utils/get_sizeof_datatype.hh Tue Apr 05 15:14:19 2011 +0200
@@ -2,6 +2,7 @@
* matiec - a compiler for the programming languages defined in IEC 61131-3
*
* Copyright (C) 2009-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df absyntax_utils/search_base_type.cc
--- a/absyntax_utils/search_base_type.cc Mon Apr 04 19:18:22 2011 +0200
+++ b/absyntax_utils/search_base_type.cc Tue Apr 05 15:14:19 2011 +0200
@@ -2,6 +2,7 @@
* matiec - a compiler for the programming languages defined in IEC 61131-3
*
* Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df absyntax_utils/search_base_type.hh
--- a/absyntax_utils/search_base_type.hh Mon Apr 04 19:18:22 2011 +0200
+++ b/absyntax_utils/search_base_type.hh Tue Apr 05 15:14:19 2011 +0200
@@ -2,6 +2,7 @@
* matiec - a compiler for the programming languages defined in IEC 61131-3
*
* Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df absyntax_utils/search_constant_type.cc
--- a/absyntax_utils/search_constant_type.cc Mon Apr 04 19:18:22 2011 +0200
+++ b/absyntax_utils/search_constant_type.cc Tue Apr 05 15:14:19 2011 +0200
@@ -2,6 +2,7 @@
* matiec - a compiler for the programming languages defined in IEC 61131-3
*
* Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df absyntax_utils/search_constant_type.hh
--- a/absyntax_utils/search_constant_type.hh Mon Apr 04 19:18:22 2011 +0200
+++ b/absyntax_utils/search_constant_type.hh Tue Apr 05 15:14:19 2011 +0200
@@ -2,6 +2,7 @@
* matiec - a compiler for the programming languages defined in IEC 61131-3
*
* Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df absyntax_utils/search_expression_type.cc
--- a/absyntax_utils/search_expression_type.cc Mon Apr 04 19:18:22 2011 +0200
+++ b/absyntax_utils/search_expression_type.cc Tue Apr 05 15:14:19 2011 +0200
@@ -2,6 +2,7 @@
* matiec - a compiler for the programming languages defined in IEC 61131-3
*
* Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df absyntax_utils/search_expression_type.hh
--- a/absyntax_utils/search_expression_type.hh Mon Apr 04 19:18:22 2011 +0200
+++ b/absyntax_utils/search_expression_type.hh Tue Apr 05 15:14:19 2011 +0200
@@ -2,6 +2,7 @@
* matiec - a compiler for the programming languages defined in IEC 61131-3
*
* Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df absyntax_utils/search_fb_instance_decl.cc
--- a/absyntax_utils/search_fb_instance_decl.cc Mon Apr 04 19:18:22 2011 +0200
+++ b/absyntax_utils/search_fb_instance_decl.cc Tue Apr 05 15:14:19 2011 +0200
@@ -2,6 +2,7 @@
* matiec - a compiler for the programming languages defined in IEC 61131-3
*
* Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df absyntax_utils/search_fb_instance_decl.hh
--- a/absyntax_utils/search_fb_instance_decl.hh Mon Apr 04 19:18:22 2011 +0200
+++ b/absyntax_utils/search_fb_instance_decl.hh Tue Apr 05 15:14:19 2011 +0200
@@ -2,6 +2,7 @@
* matiec - a compiler for the programming languages defined in IEC 61131-3
*
* Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df absyntax_utils/search_fb_typedecl.cc
--- a/absyntax_utils/search_fb_typedecl.cc Mon Apr 04 19:18:22 2011 +0200
+++ b/absyntax_utils/search_fb_typedecl.cc Tue Apr 05 15:14:19 2011 +0200
@@ -2,6 +2,7 @@
* matiec - a compiler for the programming languages defined in IEC 61131-3
*
* Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df absyntax_utils/search_fb_typedecl.hh
--- a/absyntax_utils/search_fb_typedecl.hh Mon Apr 04 19:18:22 2011 +0200
+++ b/absyntax_utils/search_fb_typedecl.hh Tue Apr 05 15:14:19 2011 +0200
@@ -2,6 +2,7 @@
* matiec - a compiler for the programming languages defined in IEC 61131-3
*
* Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df absyntax_utils/search_il_operand_type.cc
--- a/absyntax_utils/search_il_operand_type.cc Mon Apr 04 19:18:22 2011 +0200
+++ b/absyntax_utils/search_il_operand_type.cc Tue Apr 05 15:14:19 2011 +0200
@@ -2,6 +2,7 @@
* matiec - a compiler for the programming languages defined in IEC 61131-3
*
* Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df absyntax_utils/search_il_operand_type.hh
--- a/absyntax_utils/search_il_operand_type.hh Mon Apr 04 19:18:22 2011 +0200
+++ b/absyntax_utils/search_il_operand_type.hh Tue Apr 05 15:14:19 2011 +0200
@@ -2,6 +2,7 @@
* matiec - a compiler for the programming languages defined in IEC 61131-3
*
* Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df absyntax_utils/search_type_code.c
--- a/absyntax_utils/search_type_code.c Mon Apr 04 19:18:22 2011 +0200
+++ b/absyntax_utils/search_type_code.c Tue Apr 05 15:14:19 2011 +0200
@@ -1,31 +1,20 @@
/*
- * matiec - a compiler for the programming languages defined in IEC 61131-3
+ * Copyright (C) 2007-2011: Edouard TISSERANT and Laurent BESSARD
*
- * Copyright (C) 2008 Edouard TISSERANT
+ * See COPYING and COPYING.LESSER files for copyright details.
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- *
- *
- * This code is made available on the understanding that it will not be
- * used in safety-critical situations without a full and competent review.
- */
-
-/*
- * An IEC 61131-3 compiler.
- *
- * Based on the
- * FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10)
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*
*/
@@ -14103,9 +14092,9 @@
break;
/****
- *MUL
- */
- case function_mul :
+ *ADD_TIME
+ */
+ case function_add_time :
{
symbol_c *last_type_symbol = NULL;
@@ -14123,7 +14112,7 @@
last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
}
- if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
{
{
@@ -14140,10 +14129,10 @@
last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
}
- if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
{
- symbol_c * return_type_symbol = last_type_symbol;
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
return return_type_symbol;
}
@@ -14154,7 +14143,35 @@
}
- if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+
+ ERROR;
+ }
+
+ }/*function_add_time*/
+ break;
+
+/****
+ *ADD_TOD_TIME
+ */
+ case function_add_tod_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
+ symbol_c *IN1_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN1_param_value == NULL)
+ IN1_param_value = function_call_param_iterator.next_nf();
+ if (IN1_param_value != NULL) {
+ IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+ last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
+ }
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
{
{
@@ -14171,10 +14188,10 @@
last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
}
- if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
{
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
return return_type_symbol;
}
@@ -14189,13 +14206,13 @@
ERROR;
}
- }/*function_mul*/
- break;
-
-/****
- *SUB
- */
- case function_sub :
+ }/*function_add_tod_time*/
+ break;
+
+/****
+ *ADD_DT_TIME
+ */
+ case function_add_dt_time :
{
symbol_c *last_type_symbol = NULL;
@@ -14213,7 +14230,7 @@
last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
}
- if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
{
{
@@ -14230,10 +14247,10 @@
last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
}
- if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
{
- symbol_c * return_type_symbol = last_type_symbol;
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
return return_type_symbol;
}
@@ -14244,7 +14261,35 @@
}
- if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+
+ ERROR;
+ }
+
+ }/*function_add_dt_time*/
+ break;
+
+/****
+ *MUL
+ */
+ case function_mul :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
+ symbol_c *IN1_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN1_param_value == NULL)
+ IN1_param_value = function_call_param_iterator.next_nf();
+ if (IN1_param_value != NULL) {
+ IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+ last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
+ }
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
{
{
@@ -14261,10 +14306,10 @@
last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
}
- if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+ if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
{
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ symbol_c * return_type_symbol = last_type_symbol;
return return_type_symbol;
}
@@ -14275,7 +14320,7 @@
}
- if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
{
{
@@ -14292,7 +14337,7 @@
last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
}
- if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+ if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
{
symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -14300,21 +14345,41 @@
}
- if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
ERROR;
}
}
- if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+
+ ERROR;
+ }
+
+ }/*function_mul*/
+ break;
+
+/****
+ *MULTIME
+ */
+ case function_multime :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
+ symbol_c *IN1_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN1_param_value == NULL)
+ IN1_param_value = function_call_param_iterator.next_nf();
+ if (IN1_param_value != NULL) {
+ IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+ last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
+ }
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
{
{
@@ -14331,7 +14396,7 @@
last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
}
- if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+ if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
{
symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -14339,21 +14404,41 @@
}
- if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- return return_type_symbol;
-
- }
-
ERROR;
}
}
- if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+
+ ERROR;
+ }
+
+ }/*function_multime*/
+ break;
+
+/****
+ *SUB
+ */
+ case function_sub :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
+ symbol_c *IN1_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN1_param_value == NULL)
+ IN1_param_value = function_call_param_iterator.next_nf();
+ if (IN1_param_value != NULL) {
+ IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+ last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
+ }
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
{
{
@@ -14370,10 +14455,10 @@
last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
}
- if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
{
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ symbol_c * return_type_symbol = last_type_symbol;
return return_type_symbol;
}
@@ -14384,35 +14469,7 @@
}
-
- ERROR;
- }
-
- }/*function_sub*/
- break;
-
-/****
- *DIV
- */
- case function_div :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
- symbol_c *IN1_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN1_param_value == NULL)
- IN1_param_value = function_call_param_iterator.next_nf();
- if (IN1_param_value != NULL) {
- IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
- last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
- }
-
- if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
{
{
@@ -14429,10 +14486,10 @@
last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
}
- if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
{
- symbol_c * return_type_symbol = last_type_symbol;
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
return return_type_symbol;
}
@@ -14443,7 +14500,7 @@
}
- if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
{
{
@@ -14460,7 +14517,7 @@
last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
}
- if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
{
symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -14468,12 +14525,483 @@
}
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
ERROR;
}
}
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+ {
+
+ {
+ symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
+ symbol_c *IN2_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN2_param_value == NULL)
+ IN2_param_value = function_call_param_iterator.next_nf();
+ if (IN2_param_value != NULL) {
+ IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+ last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ {
+
+ {
+ symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
+ symbol_c *IN2_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN2_param_value == NULL)
+ IN2_param_value = function_call_param_iterator.next_nf();
+ if (IN2_param_value != NULL) {
+ IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+ last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sub*/
+ break;
+
+/****
+ *SUB_TIME
+ */
+ case function_sub_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
+ symbol_c *IN1_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN1_param_value == NULL)
+ IN1_param_value = function_call_param_iterator.next_nf();
+ if (IN1_param_value != NULL) {
+ IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+ last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
+ }
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ {
+
+ {
+ symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
+ symbol_c *IN2_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN2_param_value == NULL)
+ IN2_param_value = function_call_param_iterator.next_nf();
+ if (IN2_param_value != NULL) {
+ IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+ last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sub_time*/
+ break;
+
+/****
+ *SUB_DATE_DATE
+ */
+ case function_sub_date_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
+ symbol_c *IN1_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN1_param_value == NULL)
+ IN1_param_value = function_call_param_iterator.next_nf();
+ if (IN1_param_value != NULL) {
+ IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+ last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
+ }
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+ {
+
+ {
+ symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
+ symbol_c *IN2_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN2_param_value == NULL)
+ IN2_param_value = function_call_param_iterator.next_nf();
+ if (IN2_param_value != NULL) {
+ IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+ last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sub_date_date*/
+ break;
+
+/****
+ *SUB_TOD_TIME
+ */
+ case function_sub_tod_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
+ symbol_c *IN1_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN1_param_value == NULL)
+ IN1_param_value = function_call_param_iterator.next_nf();
+ if (IN1_param_value != NULL) {
+ IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+ last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
+ }
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+ {
+
+ {
+ symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
+ symbol_c *IN2_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN2_param_value == NULL)
+ IN2_param_value = function_call_param_iterator.next_nf();
+ if (IN2_param_value != NULL) {
+ IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+ last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sub_tod_time*/
+ break;
+
+/****
+ *SUB_TOD_TOD
+ */
+ case function_sub_tod_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
+ symbol_c *IN1_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN1_param_value == NULL)
+ IN1_param_value = function_call_param_iterator.next_nf();
+ if (IN1_param_value != NULL) {
+ IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+ last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
+ }
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+ {
+
+ {
+ symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
+ symbol_c *IN2_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN2_param_value == NULL)
+ IN2_param_value = function_call_param_iterator.next_nf();
+ if (IN2_param_value != NULL) {
+ IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+ last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sub_tod_tod*/
+ break;
+
+/****
+ *SUB_DT_TIME
+ */
+ case function_sub_dt_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
+ symbol_c *IN1_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN1_param_value == NULL)
+ IN1_param_value = function_call_param_iterator.next_nf();
+ if (IN1_param_value != NULL) {
+ IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+ last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
+ }
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+ {
+
+ {
+ symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
+ symbol_c *IN2_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN2_param_value == NULL)
+ IN2_param_value = function_call_param_iterator.next_nf();
+ if (IN2_param_value != NULL) {
+ IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+ last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sub_dt_time*/
+ break;
+
+/****
+ *DIV
+ */
+ case function_div :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
+ symbol_c *IN1_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN1_param_value == NULL)
+ IN1_param_value = function_call_param_iterator.next_nf();
+ if (IN1_param_value != NULL) {
+ IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+ last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
+ }
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
+ {
+
+ {
+ symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
+ symbol_c *IN2_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN2_param_value == NULL)
+ IN2_param_value = function_call_param_iterator.next_nf();
+ if (IN2_param_value != NULL) {
+ IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+ last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
+ {
+
+ symbol_c * return_type_symbol = last_type_symbol;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ {
+
+ {
+ symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
+ symbol_c *IN2_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN2_param_value == NULL)
+ IN2_param_value = function_call_param_iterator.next_nf();
+ if (IN2_param_value != NULL) {
+ IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+ last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }
+
ERROR;
}
@@ -14482,6 +15010,65 @@
break;
/****
+ *DIVTIME
+ */
+ case function_divtime :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
+ symbol_c *IN1_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN1_param_value == NULL)
+ IN1_param_value = function_call_param_iterator.next_nf();
+ if (IN1_param_value != NULL) {
+ IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+ last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
+ }
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ {
+
+ {
+ symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
+ symbol_c *IN2_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN2_param_value == NULL)
+ IN2_param_value = function_call_param_iterator.next_nf();
+ if (IN2_param_value != NULL) {
+ IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+ last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_divtime*/
+ break;
+
+/****
*MOD
*/
case function_mod :
@@ -16059,7 +16646,7 @@
last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
}
- if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
{
{
@@ -16076,10 +16663,10 @@
last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
}
- if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
{
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
return return_type_symbol;
}
@@ -16090,7 +16677,35 @@
}
- if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+
+ ERROR;
+ }
+
+ }/*function_concat*/
+ break;
+
+/****
+ *CONCAT_DAT_TOD
+ */
+ case function_concat_dat_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
+ symbol_c *IN1_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN1_param_value == NULL)
+ IN1_param_value = function_call_param_iterator.next_nf();
+ if (IN1_param_value != NULL) {
+ IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+ last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
+ }
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
{
{
@@ -16107,10 +16722,10 @@
last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
}
- if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
{
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
return return_type_symbol;
}
@@ -16125,7 +16740,7 @@
ERROR;
}
- }/*function_concat*/
+ }/*function_concat_dat_tod*/
break;
/****
@@ -26649,9 +27264,9 @@
break;
/****
- *MUL
- */
- case function_mul :
+ *ADD_TIME
+ */
+ case function_add_time :
{
symbol_c *last_type_symbol = NULL;
@@ -26659,7 +27274,7 @@
symbol_c *IN1_type_symbol = param_data_type;
last_type_symbol = param_data_type;
- if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
{
{
@@ -26676,10 +27291,10 @@
last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
}
- if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
{
- symbol_c * return_type_symbol = last_type_symbol;
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
return return_type_symbol;
}
@@ -26690,7 +27305,25 @@
}
- if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+
+ ERROR;
+ }
+
+ }/*function_add_time*/
+ break;
+
+/****
+ *ADD_TOD_TIME
+ */
+ case function_add_tod_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_type_symbol = param_data_type;
+ last_type_symbol = param_data_type;
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
{
{
@@ -26707,10 +27340,10 @@
last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
}
- if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
{
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
return return_type_symbol;
}
@@ -26725,13 +27358,13 @@
ERROR;
}
- }/*function_mul*/
- break;
-
-/****
- *SUB
- */
- case function_sub :
+ }/*function_add_tod_time*/
+ break;
+
+/****
+ *ADD_DT_TIME
+ */
+ case function_add_dt_time :
{
symbol_c *last_type_symbol = NULL;
@@ -26739,7 +27372,7 @@
symbol_c *IN1_type_symbol = param_data_type;
last_type_symbol = param_data_type;
- if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
{
{
@@ -26756,10 +27389,10 @@
last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
}
- if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
{
- symbol_c * return_type_symbol = last_type_symbol;
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
return return_type_symbol;
}
@@ -26770,7 +27403,25 @@
}
- if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+
+ ERROR;
+ }
+
+ }/*function_add_dt_time*/
+ break;
+
+/****
+ *MUL
+ */
+ case function_mul :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_type_symbol = param_data_type;
+ last_type_symbol = param_data_type;
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
{
{
@@ -26787,10 +27438,10 @@
last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
}
- if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+ if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
{
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ symbol_c * return_type_symbol = last_type_symbol;
return return_type_symbol;
}
@@ -26801,7 +27452,7 @@
}
- if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
{
{
@@ -26818,7 +27469,7 @@
last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
}
- if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+ if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
{
symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -26826,21 +27477,31 @@
}
- if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
ERROR;
}
}
- if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+
+ ERROR;
+ }
+
+ }/*function_mul*/
+ break;
+
+/****
+ *MULTIME
+ */
+ case function_multime :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_type_symbol = param_data_type;
+ last_type_symbol = param_data_type;
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
{
{
@@ -26857,7 +27518,7 @@
last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
}
- if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+ if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
{
symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -26865,21 +27526,31 @@
}
- if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- return return_type_symbol;
-
- }
-
ERROR;
}
}
- if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+
+ ERROR;
+ }
+
+ }/*function_multime*/
+ break;
+
+/****
+ *SUB
+ */
+ case function_sub :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_type_symbol = param_data_type;
+ last_type_symbol = param_data_type;
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
{
{
@@ -26896,10 +27567,10 @@
last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
}
- if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
{
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ symbol_c * return_type_symbol = last_type_symbol;
return return_type_symbol;
}
@@ -26910,25 +27581,7 @@
}
-
- ERROR;
- }
-
- }/*function_sub*/
- break;
-
-/****
- *DIV
- */
- case function_div :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN1_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
{
{
@@ -26945,10 +27598,10 @@
last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
}
- if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
{
- symbol_c * return_type_symbol = last_type_symbol;
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
return return_type_symbol;
}
@@ -26959,7 +27612,7 @@
}
- if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
{
{
@@ -26976,7 +27629,7 @@
last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
}
- if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
{
symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
@@ -26984,12 +27637,423 @@
}
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
ERROR;
}
}
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+ {
+
+ {
+ symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
+ symbol_c *IN2_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN2_param_value == NULL)
+ IN2_param_value = function_call_param_iterator.next_nf();
+ if (IN2_param_value != NULL) {
+ IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+ last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ {
+
+ {
+ symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
+ symbol_c *IN2_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN2_param_value == NULL)
+ IN2_param_value = function_call_param_iterator.next_nf();
+ if (IN2_param_value != NULL) {
+ IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+ last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sub*/
+ break;
+
+/****
+ *SUB_TIME
+ */
+ case function_sub_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_type_symbol = param_data_type;
+ last_type_symbol = param_data_type;
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ {
+
+ {
+ symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
+ symbol_c *IN2_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN2_param_value == NULL)
+ IN2_param_value = function_call_param_iterator.next_nf();
+ if (IN2_param_value != NULL) {
+ IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+ last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sub_time*/
+ break;
+
+/****
+ *SUB_DATE_DATE
+ */
+ case function_sub_date_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_type_symbol = param_data_type;
+ last_type_symbol = param_data_type;
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+ {
+
+ {
+ symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
+ symbol_c *IN2_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN2_param_value == NULL)
+ IN2_param_value = function_call_param_iterator.next_nf();
+ if (IN2_param_value != NULL) {
+ IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+ last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sub_date_date*/
+ break;
+
+/****
+ *SUB_TOD_TIME
+ */
+ case function_sub_tod_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_type_symbol = param_data_type;
+ last_type_symbol = param_data_type;
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+ {
+
+ {
+ symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
+ symbol_c *IN2_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN2_param_value == NULL)
+ IN2_param_value = function_call_param_iterator.next_nf();
+ if (IN2_param_value != NULL) {
+ IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+ last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sub_tod_time*/
+ break;
+
+/****
+ *SUB_TOD_TOD
+ */
+ case function_sub_tod_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_type_symbol = param_data_type;
+ last_type_symbol = param_data_type;
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+ {
+
+ {
+ symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
+ symbol_c *IN2_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN2_param_value == NULL)
+ IN2_param_value = function_call_param_iterator.next_nf();
+ if (IN2_param_value != NULL) {
+ IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+ last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sub_tod_tod*/
+ break;
+
+/****
+ *SUB_DT_TIME
+ */
+ case function_sub_dt_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_type_symbol = param_data_type;
+ last_type_symbol = param_data_type;
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+ {
+
+ {
+ symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
+ symbol_c *IN2_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN2_param_value == NULL)
+ IN2_param_value = function_call_param_iterator.next_nf();
+ if (IN2_param_value != NULL) {
+ IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+ last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sub_dt_time*/
+ break;
+
+/****
+ *DIV
+ */
+ case function_div :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_type_symbol = param_data_type;
+ last_type_symbol = param_data_type;
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
+ {
+
+ {
+ symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
+ symbol_c *IN2_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN2_param_value == NULL)
+ IN2_param_value = function_call_param_iterator.next_nf();
+ if (IN2_param_value != NULL) {
+ IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+ last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
+ {
+
+ symbol_c * return_type_symbol = last_type_symbol;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ {
+
+ {
+ symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
+ symbol_c *IN2_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN2_param_value == NULL)
+ IN2_param_value = function_call_param_iterator.next_nf();
+ if (IN2_param_value != NULL) {
+ IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+ last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }
+
ERROR;
}
@@ -26998,6 +28062,55 @@
break;
/****
+ *DIVTIME
+ */
+ case function_divtime :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_type_symbol = param_data_type;
+ last_type_symbol = param_data_type;
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ {
+
+ {
+ symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
+ symbol_c *IN2_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN2_param_value == NULL)
+ IN2_param_value = function_call_param_iterator.next_nf();
+ if (IN2_param_value != NULL) {
+ IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+ last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
+ {
+
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ return return_type_symbol;
+
+ }
+
+
+ ERROR;
+ }
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_divtime*/
+ break;
+
+/****
*MOD
*/
case function_mod :
@@ -28305,7 +29418,7 @@
symbol_c *IN1_type_symbol = param_data_type;
last_type_symbol = param_data_type;
- if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
{
{
@@ -28322,10 +29435,10 @@
last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
}
- if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
{
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
return return_type_symbol;
}
@@ -28336,7 +29449,25 @@
}
- if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+
+ ERROR;
+ }
+
+ }/*function_concat*/
+ break;
+
+/****
+ *CONCAT_DAT_TOD
+ */
+ case function_concat_dat_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_type_symbol = param_data_type;
+ last_type_symbol = param_data_type;
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
{
{
@@ -28353,10 +29484,10 @@
last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
}
- if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
{
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
return return_type_symbol;
}
@@ -28371,7 +29502,7 @@
ERROR;
}
- }/*function_concat*/
+ }/*function_concat_dat_tod*/
break;
/****
diff -r 050d31dd7c74 -r c0453b7f99df absyntax_utils/search_var_instance_decl.cc
--- a/absyntax_utils/search_var_instance_decl.cc Mon Apr 04 19:18:22 2011 +0200
+++ b/absyntax_utils/search_var_instance_decl.cc Tue Apr 05 15:14:19 2011 +0200
@@ -2,6 +2,7 @@
* matiec - a compiler for the programming languages defined in IEC 61131-3
*
* Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df absyntax_utils/search_var_instance_decl.hh
--- a/absyntax_utils/search_var_instance_decl.hh Mon Apr 04 19:18:22 2011 +0200
+++ b/absyntax_utils/search_var_instance_decl.hh Tue Apr 05 15:14:19 2011 +0200
@@ -2,6 +2,7 @@
* matiec - a compiler for the programming languages defined in IEC 61131-3
*
* Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df absyntax_utils/search_varfb_instance_type.cc
--- a/absyntax_utils/search_varfb_instance_type.cc Mon Apr 04 19:18:22 2011 +0200
+++ b/absyntax_utils/search_varfb_instance_type.cc Tue Apr 05 15:14:19 2011 +0200
@@ -2,6 +2,7 @@
* matiec - a compiler for the programming languages defined in IEC 61131-3
*
* Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df absyntax_utils/search_varfb_instance_type.hh
--- a/absyntax_utils/search_varfb_instance_type.hh Mon Apr 04 19:18:22 2011 +0200
+++ b/absyntax_utils/search_varfb_instance_type.hh Tue Apr 05 15:14:19 2011 +0200
@@ -2,6 +2,7 @@
* matiec - a compiler for the programming languages defined in IEC 61131-3
*
* Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df absyntax_utils/spec_init_separator.cc
--- a/absyntax_utils/spec_init_separator.cc Mon Apr 04 19:18:22 2011 +0200
+++ b/absyntax_utils/spec_init_separator.cc Tue Apr 05 15:14:19 2011 +0200
@@ -2,6 +2,7 @@
* matiec - a compiler for the programming languages defined in IEC 61131-3
*
* Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df absyntax_utils/spec_init_separator.hh
--- a/absyntax_utils/spec_init_separator.hh Mon Apr 04 19:18:22 2011 +0200
+++ b/absyntax_utils/spec_init_separator.hh Tue Apr 05 15:14:19 2011 +0200
@@ -2,6 +2,7 @@
* matiec - a compiler for the programming languages defined in IEC 61131-3
*
* Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df absyntax_utils/type_initial_value.cc
--- a/absyntax_utils/type_initial_value.cc Mon Apr 04 19:18:22 2011 +0200
+++ b/absyntax_utils/type_initial_value.cc Tue Apr 05 15:14:19 2011 +0200
@@ -2,6 +2,7 @@
* matiec - a compiler for the programming languages defined in IEC 61131-3
*
* Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df absyntax_utils/type_initial_value.hh
--- a/absyntax_utils/type_initial_value.hh Mon Apr 04 19:18:22 2011 +0200
+++ b/absyntax_utils/type_initial_value.hh Tue Apr 05 15:14:19 2011 +0200
@@ -2,6 +2,7 @@
* matiec - a compiler for the programming languages defined in IEC 61131-3
*
* Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df lib/create_standard_function_header.sh
--- a/lib/create_standard_function_header.sh Mon Apr 04 19:18:22 2011 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,527 +0,0 @@
-#!/bin/sh
-
-#/*
-# * matiec - a compiler for the programming languages defined in IEC 61131-3
-# * Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
-# *
-# * This program is free software: you can redistribute it and/or modify
-# * it under the terms of the GNU General Public License as published by
-# * the Free Software Foundation, either version 3 of the License, or
-# * (at your option) any later version.
-# *
-# * This program is distributed in the hope that it will be useful,
-# * but WITHOUT ANY WARRANTY; without even the implied warranty of
-# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# * GNU General Public License for more details.
-# *
-# * You should have received a copy of the GNU General Public License
-# * along with this program. If not, see .
-# *
-# *
-# * This code is made available on the understanding that it will not be
-# * used in safety-critical situations without a full and competent review.
-# */
-#
-#/*
-# * An IEC 61131-3 compiler.
-# *
-# * Based on the
-# * FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10)
-# *
-# */
-#
-#
-# A shell script to create the library header file containing the
-# standard functions defined in IEC 61131-3
-#
-
-
-create()
-{
-echo
-echo
-echo FUNCTION $1 : $3
-echo " "VAR_INPUT IN: $2";" END_VAR
-echo " "VAR_OUTPUT OUT: $3";" END_VAR
-echo " "LD TRUE
-echo END_FUNCTION
-}
-
-
-
-
-echo
-echo {disable code generation}
-echo
-echo
-
-create REAL_TO_SINT REAL SINT
-create REAL_TO_LINT REAL LINT
-create REAL_TO_DINT REAL DINT
-create REAL_TO_DATE REAL DATE
-create REAL_TO_DWORD REAL DWORD
-create REAL_TO_DT REAL DT
-create REAL_TO_TOD REAL TOD
-create REAL_TO_UDINT REAL UDINT
-create REAL_TO_WORD REAL WORD
-create REAL_TO_STRING REAL STRING
-create REAL_TO_LWORD REAL LWORD
-create REAL_TO_UINT REAL UINT
-create REAL_TO_LREAL REAL LREAL
-create REAL_TO_BYTE REAL BYTE
-create REAL_TO_USINT REAL USINT
-create REAL_TO_ULINT REAL ULINT
-create REAL_TO_BOOL REAL BOOL
-create REAL_TO_TIME REAL TIME
-create REAL_TO_INT REAL INT
-create SINT_TO_REAL SINT REAL
-create SINT_TO_LINT SINT LINT
-create SINT_TO_DINT SINT DINT
-create SINT_TO_DATE SINT DATE
-create SINT_TO_DWORD SINT DWORD
-create SINT_TO_DT SINT DT
-create SINT_TO_TOD SINT TOD
-create SINT_TO_UDINT SINT UDINT
-create SINT_TO_WORD SINT WORD
-create SINT_TO_STRING SINT STRING
-create SINT_TO_LWORD SINT LWORD
-create SINT_TO_UINT SINT UINT
-create SINT_TO_LREAL SINT LREAL
-create SINT_TO_BYTE SINT BYTE
-create SINT_TO_USINT SINT USINT
-create SINT_TO_ULINT SINT ULINT
-create SINT_TO_BOOL SINT BOOL
-create SINT_TO_TIME SINT TIME
-create SINT_TO_INT SINT INT
-create LINT_TO_REAL LINT REAL
-create LINT_TO_SINT LINT SINT
-create LINT_TO_DINT LINT DINT
-create LINT_TO_DATE LINT DATE
-create LINT_TO_DWORD LINT DWORD
-create LINT_TO_DT LINT DT
-create LINT_TO_TOD LINT TOD
-create LINT_TO_UDINT LINT UDINT
-create LINT_TO_WORD LINT WORD
-create LINT_TO_STRING LINT STRING
-create LINT_TO_LWORD LINT LWORD
-create LINT_TO_UINT LINT UINT
-create LINT_TO_LREAL LINT LREAL
-create LINT_TO_BYTE LINT BYTE
-create LINT_TO_USINT LINT USINT
-create LINT_TO_ULINT LINT ULINT
-create LINT_TO_BOOL LINT BOOL
-create LINT_TO_TIME LINT TIME
-create LINT_TO_INT LINT INT
-create DINT_TO_REAL DINT REAL
-create DINT_TO_SINT DINT SINT
-create DINT_TO_LINT DINT LINT
-create DINT_TO_DATE DINT DATE
-create DINT_TO_DWORD DINT DWORD
-create DINT_TO_DT DINT DT
-create DINT_TO_TOD DINT TOD
-create DINT_TO_UDINT DINT UDINT
-create DINT_TO_WORD DINT WORD
-create DINT_TO_STRING DINT STRING
-create DINT_TO_LWORD DINT LWORD
-create DINT_TO_UINT DINT UINT
-create DINT_TO_LREAL DINT LREAL
-create DINT_TO_BYTE DINT BYTE
-create DINT_TO_USINT DINT USINT
-create DINT_TO_ULINT DINT ULINT
-create DINT_TO_BOOL DINT BOOL
-create DINT_TO_TIME DINT TIME
-create DINT_TO_INT DINT INT
-create DATE_TO_REAL DATE REAL
-create DATE_TO_SINT DATE SINT
-create DATE_TO_LINT DATE LINT
-create DATE_TO_DINT DATE DINT
-create DATE_TO_DWORD DATE DWORD
-create DATE_TO_UDINT DATE UDINT
-create DATE_TO_WORD DATE WORD
-create DATE_TO_STRING DATE STRING
-create DATE_TO_LWORD DATE LWORD
-create DATE_TO_UINT DATE UINT
-create DATE_TO_LREAL DATE LREAL
-create DATE_TO_BYTE DATE BYTE
-create DATE_TO_USINT DATE USINT
-create DATE_TO_ULINT DATE ULINT
-create DATE_TO_INT DATE INT
-create DWORD_TO_REAL DWORD REAL
-create DWORD_TO_SINT DWORD SINT
-create DWORD_TO_LINT DWORD LINT
-create DWORD_TO_DINT DWORD DINT
-create DWORD_TO_DATE DWORD DATE
-create DWORD_TO_DT DWORD DT
-create DWORD_TO_TOD DWORD TOD
-create DWORD_TO_UDINT DWORD UDINT
-create DWORD_TO_WORD DWORD WORD
-create DWORD_TO_STRING DWORD STRING
-create DWORD_TO_LWORD DWORD LWORD
-create DWORD_TO_UINT DWORD UINT
-create DWORD_TO_LREAL DWORD LREAL
-create DWORD_TO_BYTE DWORD BYTE
-create DWORD_TO_USINT DWORD USINT
-create DWORD_TO_ULINT DWORD ULINT
-create DWORD_TO_BOOL DWORD BOOL
-create DWORD_TO_TIME DWORD TIME
-create DWORD_TO_INT DWORD INT
-create DT_TO_REAL DT REAL
-create DT_TO_SINT DT SINT
-create DT_TO_LINT DT LINT
-create DT_TO_DINT DT DINT
-create DT_TO_DWORD DT DWORD
-create DT_TO_UDINT DT UDINT
-create DT_TO_WORD DT WORD
-create DT_TO_STRING DT STRING
-create DT_TO_LWORD DT LWORD
-create DT_TO_UINT DT UINT
-create DT_TO_LREAL DT LREAL
-create DT_TO_BYTE DT BYTE
-create DT_TO_USINT DT USINT
-create DT_TO_ULINT DT ULINT
-create DT_TO_INT DT INT
-create TOD_TO_REAL TOD REAL
-create TOD_TO_SINT TOD SINT
-create TOD_TO_LINT TOD LINT
-create TOD_TO_DINT TOD DINT
-create TOD_TO_DWORD TOD DWORD
-create TOD_TO_UDINT TOD UDINT
-create TOD_TO_WORD TOD WORD
-create TOD_TO_STRING TOD STRING
-create TOD_TO_LWORD TOD LWORD
-create TOD_TO_UINT TOD UINT
-create TOD_TO_LREAL TOD LREAL
-create TOD_TO_BYTE TOD BYTE
-create TOD_TO_USINT TOD USINT
-create TOD_TO_ULINT TOD ULINT
-create TOD_TO_INT TOD INT
-create UDINT_TO_REAL UDINT REAL
-create UDINT_TO_SINT UDINT SINT
-create UDINT_TO_LINT UDINT LINT
-create UDINT_TO_DINT UDINT DINT
-create UDINT_TO_DATE UDINT DATE
-create UDINT_TO_DWORD UDINT DWORD
-create UDINT_TO_DT UDINT DT
-create UDINT_TO_TOD UDINT TOD
-create UDINT_TO_WORD UDINT WORD
-create UDINT_TO_STRING UDINT STRING
-create UDINT_TO_LWORD UDINT LWORD
-create UDINT_TO_UINT UDINT UINT
-create UDINT_TO_LREAL UDINT LREAL
-create UDINT_TO_BYTE UDINT BYTE
-create UDINT_TO_USINT UDINT USINT
-create UDINT_TO_ULINT UDINT ULINT
-create UDINT_TO_BOOL UDINT BOOL
-create UDINT_TO_TIME UDINT TIME
-create UDINT_TO_INT UDINT INT
-create WORD_TO_REAL WORD REAL
-create WORD_TO_SINT WORD SINT
-create WORD_TO_LINT WORD LINT
-create WORD_TO_DINT WORD DINT
-create WORD_TO_DATE WORD DATE
-create WORD_TO_DWORD WORD DWORD
-create WORD_TO_DT WORD DT
-create WORD_TO_TOD WORD TOD
-create WORD_TO_UDINT WORD UDINT
-create WORD_TO_STRING WORD STRING
-create WORD_TO_LWORD WORD LWORD
-create WORD_TO_UINT WORD UINT
-create WORD_TO_LREAL WORD LREAL
-create WORD_TO_BYTE WORD BYTE
-create WORD_TO_USINT WORD USINT
-create WORD_TO_ULINT WORD ULINT
-create WORD_TO_BOOL WORD BOOL
-create WORD_TO_TIME WORD TIME
-create WORD_TO_INT WORD INT
-create STRING_TO_REAL STRING REAL
-create STRING_TO_SINT STRING SINT
-create STRING_TO_LINT STRING LINT
-create STRING_TO_DINT STRING DINT
-create STRING_TO_DATE STRING DATE
-create STRING_TO_DWORD STRING DWORD
-create STRING_TO_DT STRING DT
-create STRING_TO_TOD STRING TOD
-create STRING_TO_UDINT STRING UDINT
-create STRING_TO_WORD STRING WORD
-create STRING_TO_LWORD STRING LWORD
-create STRING_TO_UINT STRING UINT
-create STRING_TO_LREAL STRING LREAL
-create STRING_TO_BYTE STRING BYTE
-create STRING_TO_USINT STRING USINT
-create STRING_TO_ULINT STRING ULINT
-create STRING_TO_BOOL STRING BOOL
-create STRING_TO_TIME STRING TIME
-create STRING_TO_INT STRING INT
-create LWORD_TO_REAL LWORD REAL
-create LWORD_TO_SINT LWORD SINT
-create LWORD_TO_LINT LWORD LINT
-create LWORD_TO_DINT LWORD DINT
-create LWORD_TO_DATE LWORD DATE
-create LWORD_TO_DWORD LWORD DWORD
-create LWORD_TO_DT LWORD DT
-create LWORD_TO_TOD LWORD TOD
-create LWORD_TO_UDINT LWORD UDINT
-create LWORD_TO_WORD LWORD WORD
-create LWORD_TO_STRING LWORD STRING
-create LWORD_TO_UINT LWORD UINT
-create LWORD_TO_LREAL LWORD LREAL
-create LWORD_TO_BYTE LWORD BYTE
-create LWORD_TO_USINT LWORD USINT
-create LWORD_TO_ULINT LWORD ULINT
-create LWORD_TO_BOOL LWORD BOOL
-create LWORD_TO_TIME LWORD TIME
-create LWORD_TO_INT LWORD INT
-create UINT_TO_REAL UINT REAL
-create UINT_TO_SINT UINT SINT
-create UINT_TO_LINT UINT LINT
-create UINT_TO_DINT UINT DINT
-create UINT_TO_DATE UINT DATE
-create UINT_TO_DWORD UINT DWORD
-create UINT_TO_DT UINT DT
-create UINT_TO_TOD UINT TOD
-create UINT_TO_UDINT UINT UDINT
-create UINT_TO_WORD UINT WORD
-create UINT_TO_STRING UINT STRING
-create UINT_TO_LWORD UINT LWORD
-create UINT_TO_LREAL UINT LREAL
-create UINT_TO_BYTE UINT BYTE
-create UINT_TO_USINT UINT USINT
-create UINT_TO_ULINT UINT ULINT
-create UINT_TO_BOOL UINT BOOL
-create UINT_TO_TIME UINT TIME
-create UINT_TO_INT UINT INT
-create LREAL_TO_REAL LREAL REAL
-create LREAL_TO_SINT LREAL SINT
-create LREAL_TO_LINT LREAL LINT
-create LREAL_TO_DINT LREAL DINT
-create LREAL_TO_DATE LREAL DATE
-create LREAL_TO_DWORD LREAL DWORD
-create LREAL_TO_DT LREAL DT
-create LREAL_TO_TOD LREAL TOD
-create LREAL_TO_UDINT LREAL UDINT
-create LREAL_TO_WORD LREAL WORD
-create LREAL_TO_STRING LREAL STRING
-create LREAL_TO_LWORD LREAL LWORD
-create LREAL_TO_UINT LREAL UINT
-create LREAL_TO_BYTE LREAL BYTE
-create LREAL_TO_USINT LREAL USINT
-create LREAL_TO_ULINT LREAL ULINT
-create LREAL_TO_BOOL LREAL BOOL
-create LREAL_TO_TIME LREAL TIME
-create LREAL_TO_INT LREAL INT
-create BYTE_TO_REAL BYTE REAL
-create BYTE_TO_SINT BYTE SINT
-create BYTE_TO_LINT BYTE LINT
-create BYTE_TO_DINT BYTE DINT
-create BYTE_TO_DATE BYTE DATE
-create BYTE_TO_DWORD BYTE DWORD
-create BYTE_TO_DT BYTE DT
-create BYTE_TO_TOD BYTE TOD
-create BYTE_TO_UDINT BYTE UDINT
-create BYTE_TO_WORD BYTE WORD
-create BYTE_TO_STRING BYTE STRING
-create BYTE_TO_LWORD BYTE LWORD
-create BYTE_TO_UINT BYTE UINT
-create BYTE_TO_LREAL BYTE LREAL
-create BYTE_TO_USINT BYTE USINT
-create BYTE_TO_ULINT BYTE ULINT
-create BYTE_TO_BOOL BYTE BOOL
-create BYTE_TO_TIME BYTE TIME
-create BYTE_TO_INT BYTE INT
-create USINT_TO_REAL USINT REAL
-create USINT_TO_SINT USINT SINT
-create USINT_TO_LINT USINT LINT
-create USINT_TO_DINT USINT DINT
-create USINT_TO_DATE USINT DATE
-create USINT_TO_DWORD USINT DWORD
-create USINT_TO_DT USINT DT
-create USINT_TO_TOD USINT TOD
-create USINT_TO_UDINT USINT UDINT
-create USINT_TO_WORD USINT WORD
-create USINT_TO_STRING USINT STRING
-create USINT_TO_LWORD USINT LWORD
-create USINT_TO_UINT USINT UINT
-create USINT_TO_LREAL USINT LREAL
-create USINT_TO_BYTE USINT BYTE
-create USINT_TO_ULINT USINT ULINT
-create USINT_TO_BOOL USINT BOOL
-create USINT_TO_TIME USINT TIME
-create USINT_TO_INT USINT INT
-create ULINT_TO_REAL ULINT REAL
-create ULINT_TO_SINT ULINT SINT
-create ULINT_TO_LINT ULINT LINT
-create ULINT_TO_DINT ULINT DINT
-create ULINT_TO_DATE ULINT DATE
-create ULINT_TO_DWORD ULINT DWORD
-create ULINT_TO_DT ULINT DT
-create ULINT_TO_TOD ULINT TOD
-create ULINT_TO_UDINT ULINT UDINT
-create ULINT_TO_WORD ULINT WORD
-create ULINT_TO_STRING ULINT STRING
-create ULINT_TO_LWORD ULINT LWORD
-create ULINT_TO_UINT ULINT UINT
-create ULINT_TO_LREAL ULINT LREAL
-create ULINT_TO_BYTE ULINT BYTE
-create ULINT_TO_USINT ULINT USINT
-create ULINT_TO_BOOL ULINT BOOL
-create ULINT_TO_TIME ULINT TIME
-create ULINT_TO_INT ULINT INT
-create BOOL_TO_REAL BOOL REAL
-create BOOL_TO_SINT BOOL SINT
-create BOOL_TO_LINT BOOL LINT
-create BOOL_TO_DINT BOOL DINT
-create BOOL_TO_DATE BOOL DATE
-create BOOL_TO_DWORD BOOL DWORD
-create BOOL_TO_DT BOOL DT
-create BOOL_TO_TOD BOOL TOD
-create BOOL_TO_UDINT BOOL UDINT
-create BOOL_TO_WORD BOOL WORD
-create BOOL_TO_STRING BOOL STRING
-create BOOL_TO_LWORD BOOL LWORD
-create BOOL_TO_UINT BOOL UINT
-create BOOL_TO_LREAL BOOL LREAL
-create BOOL_TO_BYTE BOOL BYTE
-create BOOL_TO_USINT BOOL USINT
-create BOOL_TO_ULINT BOOL ULINT
-create BOOL_TO_TIME BOOL TIME
-create BOOL_TO_INT BOOL INT
-create TIME_TO_REAL TIME REAL
-create TIME_TO_SINT TIME SINT
-create TIME_TO_LINT TIME LINT
-create TIME_TO_DINT TIME DINT
-create TIME_TO_DWORD TIME DWORD
-create TIME_TO_UDINT TIME UDINT
-create TIME_TO_WORD TIME WORD
-create TIME_TO_STRING TIME STRING
-create TIME_TO_LWORD TIME LWORD
-create TIME_TO_UINT TIME UINT
-create TIME_TO_LREAL TIME LREAL
-create TIME_TO_BYTE TIME BYTE
-create TIME_TO_USINT TIME USINT
-create TIME_TO_ULINT TIME ULINT
-create TIME_TO_INT TIME INT
-create INT_TO_REAL INT REAL
-create INT_TO_SINT INT SINT
-create INT_TO_LINT INT LINT
-create INT_TO_DINT INT DINT
-create INT_TO_DATE INT DATE
-create INT_TO_DWORD INT DWORD
-create INT_TO_DT INT DT
-create INT_TO_TOD INT TOD
-create INT_TO_UDINT INT UDINT
-create INT_TO_WORD INT WORD
-create INT_TO_STRING INT STRING
-create INT_TO_LWORD INT LWORD
-create INT_TO_UINT INT UINT
-create INT_TO_LREAL INT LREAL
-create INT_TO_BYTE INT BYTE
-create INT_TO_USINT INT USINT
-create INT_TO_ULINT INT ULINT
-create INT_TO_BOOL INT BOOL
-create INT_TO_TIME INT TIME
-
-create DATE_AND_TIME_TO_TIME_OF_DAY DATE_AND_TIME TIME_OF_DAY
-create DATE_AND_TIME_TO_DATE DATE_AND_TIME DATE
-
-echo
-echo
-echo "(* *BCD_TO_** and **_TO_BCD* are not yet supported *)"
-echo "(* We comment them out for now... *)"
-echo "(*"
-create UDINT_TO_BCD_BYTE UDINT BYTE
-create UDINT_TO_BCD_WORD UDINT WORD
-create UDINT_TO_BCD_DWORD UDINT DWORD
-create UDINT_TO_BCD_LWORD UDINT LWORD
-create UINT_TO_BCD_BYTE UINT BYTE
-create UINT_TO_BCD_WORD UINT WORD
-create UINT_TO_BCD_DWORD UINT DWORD
-create UINT_TO_BCD_LWORD UINT LWORD
-create USINT_TO_BCD_BYTE USINT BYTE
-create USINT_TO_BCD_WORD USINT WORD
-create USINT_TO_BCD_DWORD USINT DWORD
-create USINT_TO_BCD_LWORD USINT LWORD
-create ULINT_TO_BCD_BYTE ULINT BYTE
-create ULINT_TO_BCD_WORD ULINT WORD
-create ULINT_TO_BCD_DWORD ULINT DWORD
-create ULINT_TO_BCD_LWORD ULINT LWORD
-
-create BYTE_BCD_TO_UDINT BYTE UDINT
-create WORD_BCD_TO_UDINT WORD UDINT
-create DWORD_BCD_TO_UDINT DWORD UDINT
-create LWORD_BCD_TO_UDINT LWORD UDINT
-create BYTE_BCD_TO_UINT BYTE UINT
-create WORD_BCD_TO_UINT WORD UINT
-create DWORD_BCD_TO_UINT DWORD UINT
-create LWORD_BCD_TO_UINT LWORD UINT
-create BYTE_BCD_TO_USINT BYTE USINT
-create WORD_BCD_TO_USINT WORD USINT
-create DWORD_BCD_TO_USINT DWORD USINT
-create LWORD_BCD_TO_USINT LWORD USINT
-create BYTE_BCD_TO_ULINT BYTE ULINT
-create WORD_BCD_TO_ULINT WORD ULINT
-create DWORD_BCD_TO_ULINT DWORD ULINT
-create LWORD_BCD_TO_ULINT LWORD ULINT
-echo "*)"
-
-
-echo
-echo {enable code generation}
-
-exit 0
-
- ABS
- SQRT
- LN
- LOG
- EXP
- SIN
- COS
- TAN
- ASIN
- ACOS
- ATAN
- ADD
- MUL
- SUB
- DIV
- MOD
- EXPT
- MOVE
- SHL
- SHR
- ROR
- ROL
- AND
- OR
- XOR
- NOT
- SEL
- MAX
- MIN
- LIMIT
- MUX
- GT
- GE
- EQ
- LT
- LE
- NE
- LEN
- LEFT
- RIGHT
- MID
- CONCAT
- INSERT
- DELETE
- REPLACE
- FIND
-
- TRUNC
-
-
-
-
-
-
-
-
diff -r 050d31dd7c74 -r c0453b7f99df lib/iec_std_lib_generated.h
--- a/lib/iec_std_lib_generated.h Mon Apr 04 19:18:22 2011 +0200
+++ b/lib/iec_std_lib_generated.h Tue Apr 05 15:14:19 2011 +0200
@@ -1,17 +1,21 @@
/*
- * (c) 2008 Edouard TISSERANT
+ * Copyright (C) 2007-2011: Edouard TISSERANT and Laurent BESSARD
*
- * Offered to the public under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * See COPYING and COPYING.LESSER files for copyright details.
*
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
- * General Public License for more details.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
*
- * This code is made available on the understanding that it will not be
- * used in safety-critical situations without a full and competent review.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library. If not, see .
+ *
*/
/****
diff -r 050d31dd7c74 -r c0453b7f99df lib/ieclib.txt
--- a/lib/ieclib.txt Mon Apr 04 19:18:22 2011 +0200
+++ b/lib/ieclib.txt Tue Apr 05 15:14:19 2011 +0200
@@ -21,23 +21,9 @@
* used in safety-critical situations without a full and competent review.
*)
-(*
- * An IEC 61131-3 compiler.
- *
- * Based on the
- * FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10)
- *
- *)
+(* This is the library conatining the standard function blocks defined in the standard. *)
-(*******************************************************************************************************
- * This is the library conatining the standard functions and function blocks defined in the standard. *
- *******************************************************************************************************
- *)
-
-(* The standard functions *)
-(*{#include "standard_functions.txt" }*)
-
-(* The standard function blocks *)
+(* FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10) *)
{#include "edge_detection.txt" }
{#include "bistable.txt" }
{#include "counter.txt" }
@@ -48,5 +34,6 @@
{#include "pid_st.txt" }
{#include "ramp_st.txt" }
-(* Some usefull non-standard function blocks *)
+(* Frome later versions of the standard *)
{#include "sema.txt" }
+
diff -r 050d31dd7c74 -r c0453b7f99df lib/standard_functions.txt
--- a/lib/standard_functions.txt Mon Apr 04 19:18:22 2011 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,2798 +0,0 @@
-
-{disable code generation}
-
-
-
-
-FUNCTION REAL_TO_SINT : SINT
- VAR_INPUT IN: REAL; END_VAR
- VAR_OUTPUT OUT: SINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION REAL_TO_LINT : LINT
- VAR_INPUT IN: REAL; END_VAR
- VAR_OUTPUT OUT: LINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION REAL_TO_DINT : DINT
- VAR_INPUT IN: REAL; END_VAR
- VAR_OUTPUT OUT: DINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION REAL_TO_DATE : DATE
- VAR_INPUT IN: REAL; END_VAR
- VAR_OUTPUT OUT: DATE; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION REAL_TO_DWORD : DWORD
- VAR_INPUT IN: REAL; END_VAR
- VAR_OUTPUT OUT: DWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION REAL_TO_DT : DT
- VAR_INPUT IN: REAL; END_VAR
- VAR_OUTPUT OUT: DT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION REAL_TO_TOD : TOD
- VAR_INPUT IN: REAL; END_VAR
- VAR_OUTPUT OUT: TOD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION REAL_TO_UDINT : UDINT
- VAR_INPUT IN: REAL; END_VAR
- VAR_OUTPUT OUT: UDINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION REAL_TO_WORD : WORD
- VAR_INPUT IN: REAL; END_VAR
- VAR_OUTPUT OUT: WORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION REAL_TO_STRING : STRING
- VAR_INPUT IN: REAL; END_VAR
- VAR_OUTPUT OUT: STRING; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION REAL_TO_LWORD : LWORD
- VAR_INPUT IN: REAL; END_VAR
- VAR_OUTPUT OUT: LWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION REAL_TO_UINT : UINT
- VAR_INPUT IN: REAL; END_VAR
- VAR_OUTPUT OUT: UINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION REAL_TO_LREAL : LREAL
- VAR_INPUT IN: REAL; END_VAR
- VAR_OUTPUT OUT: LREAL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION REAL_TO_BYTE : BYTE
- VAR_INPUT IN: REAL; END_VAR
- VAR_OUTPUT OUT: BYTE; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION REAL_TO_USINT : USINT
- VAR_INPUT IN: REAL; END_VAR
- VAR_OUTPUT OUT: USINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION REAL_TO_ULINT : ULINT
- VAR_INPUT IN: REAL; END_VAR
- VAR_OUTPUT OUT: ULINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION REAL_TO_BOOL : BOOL
- VAR_INPUT IN: REAL; END_VAR
- VAR_OUTPUT OUT: BOOL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION REAL_TO_TIME : TIME
- VAR_INPUT IN: REAL; END_VAR
- VAR_OUTPUT OUT: TIME; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION REAL_TO_INT : INT
- VAR_INPUT IN: REAL; END_VAR
- VAR_OUTPUT OUT: INT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION SINT_TO_REAL : REAL
- VAR_INPUT IN: SINT; END_VAR
- VAR_OUTPUT OUT: REAL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION SINT_TO_LINT : LINT
- VAR_INPUT IN: SINT; END_VAR
- VAR_OUTPUT OUT: LINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION SINT_TO_DINT : DINT
- VAR_INPUT IN: SINT; END_VAR
- VAR_OUTPUT OUT: DINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION SINT_TO_DATE : DATE
- VAR_INPUT IN: SINT; END_VAR
- VAR_OUTPUT OUT: DATE; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION SINT_TO_DWORD : DWORD
- VAR_INPUT IN: SINT; END_VAR
- VAR_OUTPUT OUT: DWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION SINT_TO_DT : DT
- VAR_INPUT IN: SINT; END_VAR
- VAR_OUTPUT OUT: DT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION SINT_TO_TOD : TOD
- VAR_INPUT IN: SINT; END_VAR
- VAR_OUTPUT OUT: TOD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION SINT_TO_UDINT : UDINT
- VAR_INPUT IN: SINT; END_VAR
- VAR_OUTPUT OUT: UDINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION SINT_TO_WORD : WORD
- VAR_INPUT IN: SINT; END_VAR
- VAR_OUTPUT OUT: WORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION SINT_TO_STRING : STRING
- VAR_INPUT IN: SINT; END_VAR
- VAR_OUTPUT OUT: STRING; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION SINT_TO_LWORD : LWORD
- VAR_INPUT IN: SINT; END_VAR
- VAR_OUTPUT OUT: LWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION SINT_TO_UINT : UINT
- VAR_INPUT IN: SINT; END_VAR
- VAR_OUTPUT OUT: UINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION SINT_TO_LREAL : LREAL
- VAR_INPUT IN: SINT; END_VAR
- VAR_OUTPUT OUT: LREAL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION SINT_TO_BYTE : BYTE
- VAR_INPUT IN: SINT; END_VAR
- VAR_OUTPUT OUT: BYTE; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION SINT_TO_USINT : USINT
- VAR_INPUT IN: SINT; END_VAR
- VAR_OUTPUT OUT: USINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION SINT_TO_ULINT : ULINT
- VAR_INPUT IN: SINT; END_VAR
- VAR_OUTPUT OUT: ULINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION SINT_TO_BOOL : BOOL
- VAR_INPUT IN: SINT; END_VAR
- VAR_OUTPUT OUT: BOOL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION SINT_TO_TIME : TIME
- VAR_INPUT IN: SINT; END_VAR
- VAR_OUTPUT OUT: TIME; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION SINT_TO_INT : INT
- VAR_INPUT IN: SINT; END_VAR
- VAR_OUTPUT OUT: INT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LINT_TO_REAL : REAL
- VAR_INPUT IN: LINT; END_VAR
- VAR_OUTPUT OUT: REAL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LINT_TO_SINT : SINT
- VAR_INPUT IN: LINT; END_VAR
- VAR_OUTPUT OUT: SINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LINT_TO_DINT : DINT
- VAR_INPUT IN: LINT; END_VAR
- VAR_OUTPUT OUT: DINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LINT_TO_DATE : DATE
- VAR_INPUT IN: LINT; END_VAR
- VAR_OUTPUT OUT: DATE; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LINT_TO_DWORD : DWORD
- VAR_INPUT IN: LINT; END_VAR
- VAR_OUTPUT OUT: DWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LINT_TO_DT : DT
- VAR_INPUT IN: LINT; END_VAR
- VAR_OUTPUT OUT: DT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LINT_TO_TOD : TOD
- VAR_INPUT IN: LINT; END_VAR
- VAR_OUTPUT OUT: TOD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LINT_TO_UDINT : UDINT
- VAR_INPUT IN: LINT; END_VAR
- VAR_OUTPUT OUT: UDINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LINT_TO_WORD : WORD
- VAR_INPUT IN: LINT; END_VAR
- VAR_OUTPUT OUT: WORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LINT_TO_STRING : STRING
- VAR_INPUT IN: LINT; END_VAR
- VAR_OUTPUT OUT: STRING; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LINT_TO_LWORD : LWORD
- VAR_INPUT IN: LINT; END_VAR
- VAR_OUTPUT OUT: LWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LINT_TO_UINT : UINT
- VAR_INPUT IN: LINT; END_VAR
- VAR_OUTPUT OUT: UINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LINT_TO_LREAL : LREAL
- VAR_INPUT IN: LINT; END_VAR
- VAR_OUTPUT OUT: LREAL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LINT_TO_BYTE : BYTE
- VAR_INPUT IN: LINT; END_VAR
- VAR_OUTPUT OUT: BYTE; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LINT_TO_USINT : USINT
- VAR_INPUT IN: LINT; END_VAR
- VAR_OUTPUT OUT: USINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LINT_TO_ULINT : ULINT
- VAR_INPUT IN: LINT; END_VAR
- VAR_OUTPUT OUT: ULINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LINT_TO_BOOL : BOOL
- VAR_INPUT IN: LINT; END_VAR
- VAR_OUTPUT OUT: BOOL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LINT_TO_TIME : TIME
- VAR_INPUT IN: LINT; END_VAR
- VAR_OUTPUT OUT: TIME; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LINT_TO_INT : INT
- VAR_INPUT IN: LINT; END_VAR
- VAR_OUTPUT OUT: INT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DINT_TO_REAL : REAL
- VAR_INPUT IN: DINT; END_VAR
- VAR_OUTPUT OUT: REAL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DINT_TO_SINT : SINT
- VAR_INPUT IN: DINT; END_VAR
- VAR_OUTPUT OUT: SINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DINT_TO_LINT : LINT
- VAR_INPUT IN: DINT; END_VAR
- VAR_OUTPUT OUT: LINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DINT_TO_DATE : DATE
- VAR_INPUT IN: DINT; END_VAR
- VAR_OUTPUT OUT: DATE; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DINT_TO_DWORD : DWORD
- VAR_INPUT IN: DINT; END_VAR
- VAR_OUTPUT OUT: DWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DINT_TO_DT : DT
- VAR_INPUT IN: DINT; END_VAR
- VAR_OUTPUT OUT: DT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DINT_TO_TOD : TOD
- VAR_INPUT IN: DINT; END_VAR
- VAR_OUTPUT OUT: TOD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DINT_TO_UDINT : UDINT
- VAR_INPUT IN: DINT; END_VAR
- VAR_OUTPUT OUT: UDINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DINT_TO_WORD : WORD
- VAR_INPUT IN: DINT; END_VAR
- VAR_OUTPUT OUT: WORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DINT_TO_STRING : STRING
- VAR_INPUT IN: DINT; END_VAR
- VAR_OUTPUT OUT: STRING; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DINT_TO_LWORD : LWORD
- VAR_INPUT IN: DINT; END_VAR
- VAR_OUTPUT OUT: LWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DINT_TO_UINT : UINT
- VAR_INPUT IN: DINT; END_VAR
- VAR_OUTPUT OUT: UINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DINT_TO_LREAL : LREAL
- VAR_INPUT IN: DINT; END_VAR
- VAR_OUTPUT OUT: LREAL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DINT_TO_BYTE : BYTE
- VAR_INPUT IN: DINT; END_VAR
- VAR_OUTPUT OUT: BYTE; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DINT_TO_USINT : USINT
- VAR_INPUT IN: DINT; END_VAR
- VAR_OUTPUT OUT: USINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DINT_TO_ULINT : ULINT
- VAR_INPUT IN: DINT; END_VAR
- VAR_OUTPUT OUT: ULINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DINT_TO_BOOL : BOOL
- VAR_INPUT IN: DINT; END_VAR
- VAR_OUTPUT OUT: BOOL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DINT_TO_TIME : TIME
- VAR_INPUT IN: DINT; END_VAR
- VAR_OUTPUT OUT: TIME; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DINT_TO_INT : INT
- VAR_INPUT IN: DINT; END_VAR
- VAR_OUTPUT OUT: INT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DATE_TO_REAL : REAL
- VAR_INPUT IN: DATE; END_VAR
- VAR_OUTPUT OUT: REAL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DATE_TO_SINT : SINT
- VAR_INPUT IN: DATE; END_VAR
- VAR_OUTPUT OUT: SINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DATE_TO_LINT : LINT
- VAR_INPUT IN: DATE; END_VAR
- VAR_OUTPUT OUT: LINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DATE_TO_DINT : DINT
- VAR_INPUT IN: DATE; END_VAR
- VAR_OUTPUT OUT: DINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DATE_TO_DWORD : DWORD
- VAR_INPUT IN: DATE; END_VAR
- VAR_OUTPUT OUT: DWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DATE_TO_UDINT : UDINT
- VAR_INPUT IN: DATE; END_VAR
- VAR_OUTPUT OUT: UDINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DATE_TO_WORD : WORD
- VAR_INPUT IN: DATE; END_VAR
- VAR_OUTPUT OUT: WORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DATE_TO_STRING : STRING
- VAR_INPUT IN: DATE; END_VAR
- VAR_OUTPUT OUT: STRING; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DATE_TO_LWORD : LWORD
- VAR_INPUT IN: DATE; END_VAR
- VAR_OUTPUT OUT: LWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DATE_TO_UINT : UINT
- VAR_INPUT IN: DATE; END_VAR
- VAR_OUTPUT OUT: UINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DATE_TO_LREAL : LREAL
- VAR_INPUT IN: DATE; END_VAR
- VAR_OUTPUT OUT: LREAL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DATE_TO_BYTE : BYTE
- VAR_INPUT IN: DATE; END_VAR
- VAR_OUTPUT OUT: BYTE; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DATE_TO_USINT : USINT
- VAR_INPUT IN: DATE; END_VAR
- VAR_OUTPUT OUT: USINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DATE_TO_ULINT : ULINT
- VAR_INPUT IN: DATE; END_VAR
- VAR_OUTPUT OUT: ULINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DATE_TO_INT : INT
- VAR_INPUT IN: DATE; END_VAR
- VAR_OUTPUT OUT: INT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DWORD_TO_REAL : REAL
- VAR_INPUT IN: DWORD; END_VAR
- VAR_OUTPUT OUT: REAL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DWORD_TO_SINT : SINT
- VAR_INPUT IN: DWORD; END_VAR
- VAR_OUTPUT OUT: SINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DWORD_TO_LINT : LINT
- VAR_INPUT IN: DWORD; END_VAR
- VAR_OUTPUT OUT: LINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DWORD_TO_DINT : DINT
- VAR_INPUT IN: DWORD; END_VAR
- VAR_OUTPUT OUT: DINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DWORD_TO_DATE : DATE
- VAR_INPUT IN: DWORD; END_VAR
- VAR_OUTPUT OUT: DATE; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DWORD_TO_DT : DT
- VAR_INPUT IN: DWORD; END_VAR
- VAR_OUTPUT OUT: DT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DWORD_TO_TOD : TOD
- VAR_INPUT IN: DWORD; END_VAR
- VAR_OUTPUT OUT: TOD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DWORD_TO_UDINT : UDINT
- VAR_INPUT IN: DWORD; END_VAR
- VAR_OUTPUT OUT: UDINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DWORD_TO_WORD : WORD
- VAR_INPUT IN: DWORD; END_VAR
- VAR_OUTPUT OUT: WORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DWORD_TO_STRING : STRING
- VAR_INPUT IN: DWORD; END_VAR
- VAR_OUTPUT OUT: STRING; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DWORD_TO_LWORD : LWORD
- VAR_INPUT IN: DWORD; END_VAR
- VAR_OUTPUT OUT: LWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DWORD_TO_UINT : UINT
- VAR_INPUT IN: DWORD; END_VAR
- VAR_OUTPUT OUT: UINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DWORD_TO_LREAL : LREAL
- VAR_INPUT IN: DWORD; END_VAR
- VAR_OUTPUT OUT: LREAL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DWORD_TO_BYTE : BYTE
- VAR_INPUT IN: DWORD; END_VAR
- VAR_OUTPUT OUT: BYTE; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DWORD_TO_USINT : USINT
- VAR_INPUT IN: DWORD; END_VAR
- VAR_OUTPUT OUT: USINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DWORD_TO_ULINT : ULINT
- VAR_INPUT IN: DWORD; END_VAR
- VAR_OUTPUT OUT: ULINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DWORD_TO_BOOL : BOOL
- VAR_INPUT IN: DWORD; END_VAR
- VAR_OUTPUT OUT: BOOL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DWORD_TO_TIME : TIME
- VAR_INPUT IN: DWORD; END_VAR
- VAR_OUTPUT OUT: TIME; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DWORD_TO_INT : INT
- VAR_INPUT IN: DWORD; END_VAR
- VAR_OUTPUT OUT: INT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DT_TO_REAL : REAL
- VAR_INPUT IN: DT; END_VAR
- VAR_OUTPUT OUT: REAL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DT_TO_SINT : SINT
- VAR_INPUT IN: DT; END_VAR
- VAR_OUTPUT OUT: SINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DT_TO_LINT : LINT
- VAR_INPUT IN: DT; END_VAR
- VAR_OUTPUT OUT: LINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DT_TO_DINT : DINT
- VAR_INPUT IN: DT; END_VAR
- VAR_OUTPUT OUT: DINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DT_TO_DWORD : DWORD
- VAR_INPUT IN: DT; END_VAR
- VAR_OUTPUT OUT: DWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DT_TO_UDINT : UDINT
- VAR_INPUT IN: DT; END_VAR
- VAR_OUTPUT OUT: UDINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DT_TO_WORD : WORD
- VAR_INPUT IN: DT; END_VAR
- VAR_OUTPUT OUT: WORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DT_TO_STRING : STRING
- VAR_INPUT IN: DT; END_VAR
- VAR_OUTPUT OUT: STRING; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DT_TO_LWORD : LWORD
- VAR_INPUT IN: DT; END_VAR
- VAR_OUTPUT OUT: LWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DT_TO_UINT : UINT
- VAR_INPUT IN: DT; END_VAR
- VAR_OUTPUT OUT: UINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DT_TO_LREAL : LREAL
- VAR_INPUT IN: DT; END_VAR
- VAR_OUTPUT OUT: LREAL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DT_TO_BYTE : BYTE
- VAR_INPUT IN: DT; END_VAR
- VAR_OUTPUT OUT: BYTE; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DT_TO_USINT : USINT
- VAR_INPUT IN: DT; END_VAR
- VAR_OUTPUT OUT: USINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DT_TO_ULINT : ULINT
- VAR_INPUT IN: DT; END_VAR
- VAR_OUTPUT OUT: ULINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DT_TO_INT : INT
- VAR_INPUT IN: DT; END_VAR
- VAR_OUTPUT OUT: INT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION TOD_TO_REAL : REAL
- VAR_INPUT IN: TOD; END_VAR
- VAR_OUTPUT OUT: REAL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION TOD_TO_SINT : SINT
- VAR_INPUT IN: TOD; END_VAR
- VAR_OUTPUT OUT: SINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION TOD_TO_LINT : LINT
- VAR_INPUT IN: TOD; END_VAR
- VAR_OUTPUT OUT: LINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION TOD_TO_DINT : DINT
- VAR_INPUT IN: TOD; END_VAR
- VAR_OUTPUT OUT: DINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION TOD_TO_DWORD : DWORD
- VAR_INPUT IN: TOD; END_VAR
- VAR_OUTPUT OUT: DWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION TOD_TO_UDINT : UDINT
- VAR_INPUT IN: TOD; END_VAR
- VAR_OUTPUT OUT: UDINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION TOD_TO_WORD : WORD
- VAR_INPUT IN: TOD; END_VAR
- VAR_OUTPUT OUT: WORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION TOD_TO_STRING : STRING
- VAR_INPUT IN: TOD; END_VAR
- VAR_OUTPUT OUT: STRING; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION TOD_TO_LWORD : LWORD
- VAR_INPUT IN: TOD; END_VAR
- VAR_OUTPUT OUT: LWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION TOD_TO_UINT : UINT
- VAR_INPUT IN: TOD; END_VAR
- VAR_OUTPUT OUT: UINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION TOD_TO_LREAL : LREAL
- VAR_INPUT IN: TOD; END_VAR
- VAR_OUTPUT OUT: LREAL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION TOD_TO_BYTE : BYTE
- VAR_INPUT IN: TOD; END_VAR
- VAR_OUTPUT OUT: BYTE; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION TOD_TO_USINT : USINT
- VAR_INPUT IN: TOD; END_VAR
- VAR_OUTPUT OUT: USINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION TOD_TO_ULINT : ULINT
- VAR_INPUT IN: TOD; END_VAR
- VAR_OUTPUT OUT: ULINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION TOD_TO_INT : INT
- VAR_INPUT IN: TOD; END_VAR
- VAR_OUTPUT OUT: INT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION UDINT_TO_REAL : REAL
- VAR_INPUT IN: UDINT; END_VAR
- VAR_OUTPUT OUT: REAL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION UDINT_TO_SINT : SINT
- VAR_INPUT IN: UDINT; END_VAR
- VAR_OUTPUT OUT: SINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION UDINT_TO_LINT : LINT
- VAR_INPUT IN: UDINT; END_VAR
- VAR_OUTPUT OUT: LINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION UDINT_TO_DINT : DINT
- VAR_INPUT IN: UDINT; END_VAR
- VAR_OUTPUT OUT: DINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION UDINT_TO_DATE : DATE
- VAR_INPUT IN: UDINT; END_VAR
- VAR_OUTPUT OUT: DATE; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION UDINT_TO_DWORD : DWORD
- VAR_INPUT IN: UDINT; END_VAR
- VAR_OUTPUT OUT: DWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION UDINT_TO_DT : DT
- VAR_INPUT IN: UDINT; END_VAR
- VAR_OUTPUT OUT: DT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION UDINT_TO_TOD : TOD
- VAR_INPUT IN: UDINT; END_VAR
- VAR_OUTPUT OUT: TOD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION UDINT_TO_WORD : WORD
- VAR_INPUT IN: UDINT; END_VAR
- VAR_OUTPUT OUT: WORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION UDINT_TO_STRING : STRING
- VAR_INPUT IN: UDINT; END_VAR
- VAR_OUTPUT OUT: STRING; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION UDINT_TO_LWORD : LWORD
- VAR_INPUT IN: UDINT; END_VAR
- VAR_OUTPUT OUT: LWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION UDINT_TO_UINT : UINT
- VAR_INPUT IN: UDINT; END_VAR
- VAR_OUTPUT OUT: UINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION UDINT_TO_LREAL : LREAL
- VAR_INPUT IN: UDINT; END_VAR
- VAR_OUTPUT OUT: LREAL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION UDINT_TO_BYTE : BYTE
- VAR_INPUT IN: UDINT; END_VAR
- VAR_OUTPUT OUT: BYTE; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION UDINT_TO_USINT : USINT
- VAR_INPUT IN: UDINT; END_VAR
- VAR_OUTPUT OUT: USINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION UDINT_TO_ULINT : ULINT
- VAR_INPUT IN: UDINT; END_VAR
- VAR_OUTPUT OUT: ULINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION UDINT_TO_BOOL : BOOL
- VAR_INPUT IN: UDINT; END_VAR
- VAR_OUTPUT OUT: BOOL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION UDINT_TO_TIME : TIME
- VAR_INPUT IN: UDINT; END_VAR
- VAR_OUTPUT OUT: TIME; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION UDINT_TO_INT : INT
- VAR_INPUT IN: UDINT; END_VAR
- VAR_OUTPUT OUT: INT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION WORD_TO_REAL : REAL
- VAR_INPUT IN: WORD; END_VAR
- VAR_OUTPUT OUT: REAL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION WORD_TO_SINT : SINT
- VAR_INPUT IN: WORD; END_VAR
- VAR_OUTPUT OUT: SINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION WORD_TO_LINT : LINT
- VAR_INPUT IN: WORD; END_VAR
- VAR_OUTPUT OUT: LINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION WORD_TO_DINT : DINT
- VAR_INPUT IN: WORD; END_VAR
- VAR_OUTPUT OUT: DINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION WORD_TO_DATE : DATE
- VAR_INPUT IN: WORD; END_VAR
- VAR_OUTPUT OUT: DATE; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION WORD_TO_DWORD : DWORD
- VAR_INPUT IN: WORD; END_VAR
- VAR_OUTPUT OUT: DWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION WORD_TO_DT : DT
- VAR_INPUT IN: WORD; END_VAR
- VAR_OUTPUT OUT: DT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION WORD_TO_TOD : TOD
- VAR_INPUT IN: WORD; END_VAR
- VAR_OUTPUT OUT: TOD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION WORD_TO_UDINT : UDINT
- VAR_INPUT IN: WORD; END_VAR
- VAR_OUTPUT OUT: UDINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION WORD_TO_STRING : STRING
- VAR_INPUT IN: WORD; END_VAR
- VAR_OUTPUT OUT: STRING; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION WORD_TO_LWORD : LWORD
- VAR_INPUT IN: WORD; END_VAR
- VAR_OUTPUT OUT: LWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION WORD_TO_UINT : UINT
- VAR_INPUT IN: WORD; END_VAR
- VAR_OUTPUT OUT: UINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION WORD_TO_LREAL : LREAL
- VAR_INPUT IN: WORD; END_VAR
- VAR_OUTPUT OUT: LREAL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION WORD_TO_BYTE : BYTE
- VAR_INPUT IN: WORD; END_VAR
- VAR_OUTPUT OUT: BYTE; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION WORD_TO_USINT : USINT
- VAR_INPUT IN: WORD; END_VAR
- VAR_OUTPUT OUT: USINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION WORD_TO_ULINT : ULINT
- VAR_INPUT IN: WORD; END_VAR
- VAR_OUTPUT OUT: ULINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION WORD_TO_BOOL : BOOL
- VAR_INPUT IN: WORD; END_VAR
- VAR_OUTPUT OUT: BOOL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION WORD_TO_TIME : TIME
- VAR_INPUT IN: WORD; END_VAR
- VAR_OUTPUT OUT: TIME; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION WORD_TO_INT : INT
- VAR_INPUT IN: WORD; END_VAR
- VAR_OUTPUT OUT: INT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION STRING_TO_REAL : REAL
- VAR_INPUT IN: STRING; END_VAR
- VAR_OUTPUT OUT: REAL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION STRING_TO_SINT : SINT
- VAR_INPUT IN: STRING; END_VAR
- VAR_OUTPUT OUT: SINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION STRING_TO_LINT : LINT
- VAR_INPUT IN: STRING; END_VAR
- VAR_OUTPUT OUT: LINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION STRING_TO_DINT : DINT
- VAR_INPUT IN: STRING; END_VAR
- VAR_OUTPUT OUT: DINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION STRING_TO_DATE : DATE
- VAR_INPUT IN: STRING; END_VAR
- VAR_OUTPUT OUT: DATE; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION STRING_TO_DWORD : DWORD
- VAR_INPUT IN: STRING; END_VAR
- VAR_OUTPUT OUT: DWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION STRING_TO_DT : DT
- VAR_INPUT IN: STRING; END_VAR
- VAR_OUTPUT OUT: DT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION STRING_TO_TOD : TOD
- VAR_INPUT IN: STRING; END_VAR
- VAR_OUTPUT OUT: TOD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION STRING_TO_UDINT : UDINT
- VAR_INPUT IN: STRING; END_VAR
- VAR_OUTPUT OUT: UDINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION STRING_TO_WORD : WORD
- VAR_INPUT IN: STRING; END_VAR
- VAR_OUTPUT OUT: WORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION STRING_TO_LWORD : LWORD
- VAR_INPUT IN: STRING; END_VAR
- VAR_OUTPUT OUT: LWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION STRING_TO_UINT : UINT
- VAR_INPUT IN: STRING; END_VAR
- VAR_OUTPUT OUT: UINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION STRING_TO_LREAL : LREAL
- VAR_INPUT IN: STRING; END_VAR
- VAR_OUTPUT OUT: LREAL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION STRING_TO_BYTE : BYTE
- VAR_INPUT IN: STRING; END_VAR
- VAR_OUTPUT OUT: BYTE; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION STRING_TO_USINT : USINT
- VAR_INPUT IN: STRING; END_VAR
- VAR_OUTPUT OUT: USINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION STRING_TO_ULINT : ULINT
- VAR_INPUT IN: STRING; END_VAR
- VAR_OUTPUT OUT: ULINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION STRING_TO_BOOL : BOOL
- VAR_INPUT IN: STRING; END_VAR
- VAR_OUTPUT OUT: BOOL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION STRING_TO_TIME : TIME
- VAR_INPUT IN: STRING; END_VAR
- VAR_OUTPUT OUT: TIME; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION STRING_TO_INT : INT
- VAR_INPUT IN: STRING; END_VAR
- VAR_OUTPUT OUT: INT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LWORD_TO_REAL : REAL
- VAR_INPUT IN: LWORD; END_VAR
- VAR_OUTPUT OUT: REAL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LWORD_TO_SINT : SINT
- VAR_INPUT IN: LWORD; END_VAR
- VAR_OUTPUT OUT: SINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LWORD_TO_LINT : LINT
- VAR_INPUT IN: LWORD; END_VAR
- VAR_OUTPUT OUT: LINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LWORD_TO_DINT : DINT
- VAR_INPUT IN: LWORD; END_VAR
- VAR_OUTPUT OUT: DINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LWORD_TO_DATE : DATE
- VAR_INPUT IN: LWORD; END_VAR
- VAR_OUTPUT OUT: DATE; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LWORD_TO_DWORD : DWORD
- VAR_INPUT IN: LWORD; END_VAR
- VAR_OUTPUT OUT: DWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LWORD_TO_DT : DT
- VAR_INPUT IN: LWORD; END_VAR
- VAR_OUTPUT OUT: DT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LWORD_TO_TOD : TOD
- VAR_INPUT IN: LWORD; END_VAR
- VAR_OUTPUT OUT: TOD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LWORD_TO_UDINT : UDINT
- VAR_INPUT IN: LWORD; END_VAR
- VAR_OUTPUT OUT: UDINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LWORD_TO_WORD : WORD
- VAR_INPUT IN: LWORD; END_VAR
- VAR_OUTPUT OUT: WORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LWORD_TO_STRING : STRING
- VAR_INPUT IN: LWORD; END_VAR
- VAR_OUTPUT OUT: STRING; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LWORD_TO_UINT : UINT
- VAR_INPUT IN: LWORD; END_VAR
- VAR_OUTPUT OUT: UINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LWORD_TO_LREAL : LREAL
- VAR_INPUT IN: LWORD; END_VAR
- VAR_OUTPUT OUT: LREAL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LWORD_TO_BYTE : BYTE
- VAR_INPUT IN: LWORD; END_VAR
- VAR_OUTPUT OUT: BYTE; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LWORD_TO_USINT : USINT
- VAR_INPUT IN: LWORD; END_VAR
- VAR_OUTPUT OUT: USINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LWORD_TO_ULINT : ULINT
- VAR_INPUT IN: LWORD; END_VAR
- VAR_OUTPUT OUT: ULINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LWORD_TO_BOOL : BOOL
- VAR_INPUT IN: LWORD; END_VAR
- VAR_OUTPUT OUT: BOOL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LWORD_TO_TIME : TIME
- VAR_INPUT IN: LWORD; END_VAR
- VAR_OUTPUT OUT: TIME; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LWORD_TO_INT : INT
- VAR_INPUT IN: LWORD; END_VAR
- VAR_OUTPUT OUT: INT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION UINT_TO_REAL : REAL
- VAR_INPUT IN: UINT; END_VAR
- VAR_OUTPUT OUT: REAL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION UINT_TO_SINT : SINT
- VAR_INPUT IN: UINT; END_VAR
- VAR_OUTPUT OUT: SINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION UINT_TO_LINT : LINT
- VAR_INPUT IN: UINT; END_VAR
- VAR_OUTPUT OUT: LINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION UINT_TO_DINT : DINT
- VAR_INPUT IN: UINT; END_VAR
- VAR_OUTPUT OUT: DINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION UINT_TO_DATE : DATE
- VAR_INPUT IN: UINT; END_VAR
- VAR_OUTPUT OUT: DATE; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION UINT_TO_DWORD : DWORD
- VAR_INPUT IN: UINT; END_VAR
- VAR_OUTPUT OUT: DWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION UINT_TO_DT : DT
- VAR_INPUT IN: UINT; END_VAR
- VAR_OUTPUT OUT: DT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION UINT_TO_TOD : TOD
- VAR_INPUT IN: UINT; END_VAR
- VAR_OUTPUT OUT: TOD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION UINT_TO_UDINT : UDINT
- VAR_INPUT IN: UINT; END_VAR
- VAR_OUTPUT OUT: UDINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION UINT_TO_WORD : WORD
- VAR_INPUT IN: UINT; END_VAR
- VAR_OUTPUT OUT: WORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION UINT_TO_STRING : STRING
- VAR_INPUT IN: UINT; END_VAR
- VAR_OUTPUT OUT: STRING; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION UINT_TO_LWORD : LWORD
- VAR_INPUT IN: UINT; END_VAR
- VAR_OUTPUT OUT: LWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION UINT_TO_LREAL : LREAL
- VAR_INPUT IN: UINT; END_VAR
- VAR_OUTPUT OUT: LREAL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION UINT_TO_BYTE : BYTE
- VAR_INPUT IN: UINT; END_VAR
- VAR_OUTPUT OUT: BYTE; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION UINT_TO_USINT : USINT
- VAR_INPUT IN: UINT; END_VAR
- VAR_OUTPUT OUT: USINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION UINT_TO_ULINT : ULINT
- VAR_INPUT IN: UINT; END_VAR
- VAR_OUTPUT OUT: ULINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION UINT_TO_BOOL : BOOL
- VAR_INPUT IN: UINT; END_VAR
- VAR_OUTPUT OUT: BOOL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION UINT_TO_TIME : TIME
- VAR_INPUT IN: UINT; END_VAR
- VAR_OUTPUT OUT: TIME; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION UINT_TO_INT : INT
- VAR_INPUT IN: UINT; END_VAR
- VAR_OUTPUT OUT: INT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LREAL_TO_REAL : REAL
- VAR_INPUT IN: LREAL; END_VAR
- VAR_OUTPUT OUT: REAL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LREAL_TO_SINT : SINT
- VAR_INPUT IN: LREAL; END_VAR
- VAR_OUTPUT OUT: SINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LREAL_TO_LINT : LINT
- VAR_INPUT IN: LREAL; END_VAR
- VAR_OUTPUT OUT: LINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LREAL_TO_DINT : DINT
- VAR_INPUT IN: LREAL; END_VAR
- VAR_OUTPUT OUT: DINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LREAL_TO_DATE : DATE
- VAR_INPUT IN: LREAL; END_VAR
- VAR_OUTPUT OUT: DATE; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LREAL_TO_DWORD : DWORD
- VAR_INPUT IN: LREAL; END_VAR
- VAR_OUTPUT OUT: DWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LREAL_TO_DT : DT
- VAR_INPUT IN: LREAL; END_VAR
- VAR_OUTPUT OUT: DT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LREAL_TO_TOD : TOD
- VAR_INPUT IN: LREAL; END_VAR
- VAR_OUTPUT OUT: TOD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LREAL_TO_UDINT : UDINT
- VAR_INPUT IN: LREAL; END_VAR
- VAR_OUTPUT OUT: UDINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LREAL_TO_WORD : WORD
- VAR_INPUT IN: LREAL; END_VAR
- VAR_OUTPUT OUT: WORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LREAL_TO_STRING : STRING
- VAR_INPUT IN: LREAL; END_VAR
- VAR_OUTPUT OUT: STRING; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LREAL_TO_LWORD : LWORD
- VAR_INPUT IN: LREAL; END_VAR
- VAR_OUTPUT OUT: LWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LREAL_TO_UINT : UINT
- VAR_INPUT IN: LREAL; END_VAR
- VAR_OUTPUT OUT: UINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LREAL_TO_BYTE : BYTE
- VAR_INPUT IN: LREAL; END_VAR
- VAR_OUTPUT OUT: BYTE; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LREAL_TO_USINT : USINT
- VAR_INPUT IN: LREAL; END_VAR
- VAR_OUTPUT OUT: USINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LREAL_TO_ULINT : ULINT
- VAR_INPUT IN: LREAL; END_VAR
- VAR_OUTPUT OUT: ULINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LREAL_TO_BOOL : BOOL
- VAR_INPUT IN: LREAL; END_VAR
- VAR_OUTPUT OUT: BOOL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LREAL_TO_TIME : TIME
- VAR_INPUT IN: LREAL; END_VAR
- VAR_OUTPUT OUT: TIME; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LREAL_TO_INT : INT
- VAR_INPUT IN: LREAL; END_VAR
- VAR_OUTPUT OUT: INT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION BYTE_TO_REAL : REAL
- VAR_INPUT IN: BYTE; END_VAR
- VAR_OUTPUT OUT: REAL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION BYTE_TO_SINT : SINT
- VAR_INPUT IN: BYTE; END_VAR
- VAR_OUTPUT OUT: SINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION BYTE_TO_LINT : LINT
- VAR_INPUT IN: BYTE; END_VAR
- VAR_OUTPUT OUT: LINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION BYTE_TO_DINT : DINT
- VAR_INPUT IN: BYTE; END_VAR
- VAR_OUTPUT OUT: DINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION BYTE_TO_DATE : DATE
- VAR_INPUT IN: BYTE; END_VAR
- VAR_OUTPUT OUT: DATE; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION BYTE_TO_DWORD : DWORD
- VAR_INPUT IN: BYTE; END_VAR
- VAR_OUTPUT OUT: DWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION BYTE_TO_DT : DT
- VAR_INPUT IN: BYTE; END_VAR
- VAR_OUTPUT OUT: DT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION BYTE_TO_TOD : TOD
- VAR_INPUT IN: BYTE; END_VAR
- VAR_OUTPUT OUT: TOD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION BYTE_TO_UDINT : UDINT
- VAR_INPUT IN: BYTE; END_VAR
- VAR_OUTPUT OUT: UDINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION BYTE_TO_WORD : WORD
- VAR_INPUT IN: BYTE; END_VAR
- VAR_OUTPUT OUT: WORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION BYTE_TO_STRING : STRING
- VAR_INPUT IN: BYTE; END_VAR
- VAR_OUTPUT OUT: STRING; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION BYTE_TO_LWORD : LWORD
- VAR_INPUT IN: BYTE; END_VAR
- VAR_OUTPUT OUT: LWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION BYTE_TO_UINT : UINT
- VAR_INPUT IN: BYTE; END_VAR
- VAR_OUTPUT OUT: UINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION BYTE_TO_LREAL : LREAL
- VAR_INPUT IN: BYTE; END_VAR
- VAR_OUTPUT OUT: LREAL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION BYTE_TO_USINT : USINT
- VAR_INPUT IN: BYTE; END_VAR
- VAR_OUTPUT OUT: USINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION BYTE_TO_ULINT : ULINT
- VAR_INPUT IN: BYTE; END_VAR
- VAR_OUTPUT OUT: ULINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION BYTE_TO_BOOL : BOOL
- VAR_INPUT IN: BYTE; END_VAR
- VAR_OUTPUT OUT: BOOL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION BYTE_TO_TIME : TIME
- VAR_INPUT IN: BYTE; END_VAR
- VAR_OUTPUT OUT: TIME; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION BYTE_TO_INT : INT
- VAR_INPUT IN: BYTE; END_VAR
- VAR_OUTPUT OUT: INT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION USINT_TO_REAL : REAL
- VAR_INPUT IN: USINT; END_VAR
- VAR_OUTPUT OUT: REAL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION USINT_TO_SINT : SINT
- VAR_INPUT IN: USINT; END_VAR
- VAR_OUTPUT OUT: SINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION USINT_TO_LINT : LINT
- VAR_INPUT IN: USINT; END_VAR
- VAR_OUTPUT OUT: LINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION USINT_TO_DINT : DINT
- VAR_INPUT IN: USINT; END_VAR
- VAR_OUTPUT OUT: DINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION USINT_TO_DATE : DATE
- VAR_INPUT IN: USINT; END_VAR
- VAR_OUTPUT OUT: DATE; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION USINT_TO_DWORD : DWORD
- VAR_INPUT IN: USINT; END_VAR
- VAR_OUTPUT OUT: DWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION USINT_TO_DT : DT
- VAR_INPUT IN: USINT; END_VAR
- VAR_OUTPUT OUT: DT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION USINT_TO_TOD : TOD
- VAR_INPUT IN: USINT; END_VAR
- VAR_OUTPUT OUT: TOD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION USINT_TO_UDINT : UDINT
- VAR_INPUT IN: USINT; END_VAR
- VAR_OUTPUT OUT: UDINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION USINT_TO_WORD : WORD
- VAR_INPUT IN: USINT; END_VAR
- VAR_OUTPUT OUT: WORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION USINT_TO_STRING : STRING
- VAR_INPUT IN: USINT; END_VAR
- VAR_OUTPUT OUT: STRING; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION USINT_TO_LWORD : LWORD
- VAR_INPUT IN: USINT; END_VAR
- VAR_OUTPUT OUT: LWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION USINT_TO_UINT : UINT
- VAR_INPUT IN: USINT; END_VAR
- VAR_OUTPUT OUT: UINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION USINT_TO_LREAL : LREAL
- VAR_INPUT IN: USINT; END_VAR
- VAR_OUTPUT OUT: LREAL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION USINT_TO_BYTE : BYTE
- VAR_INPUT IN: USINT; END_VAR
- VAR_OUTPUT OUT: BYTE; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION USINT_TO_ULINT : ULINT
- VAR_INPUT IN: USINT; END_VAR
- VAR_OUTPUT OUT: ULINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION USINT_TO_BOOL : BOOL
- VAR_INPUT IN: USINT; END_VAR
- VAR_OUTPUT OUT: BOOL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION USINT_TO_TIME : TIME
- VAR_INPUT IN: USINT; END_VAR
- VAR_OUTPUT OUT: TIME; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION USINT_TO_INT : INT
- VAR_INPUT IN: USINT; END_VAR
- VAR_OUTPUT OUT: INT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION ULINT_TO_REAL : REAL
- VAR_INPUT IN: ULINT; END_VAR
- VAR_OUTPUT OUT: REAL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION ULINT_TO_SINT : SINT
- VAR_INPUT IN: ULINT; END_VAR
- VAR_OUTPUT OUT: SINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION ULINT_TO_LINT : LINT
- VAR_INPUT IN: ULINT; END_VAR
- VAR_OUTPUT OUT: LINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION ULINT_TO_DINT : DINT
- VAR_INPUT IN: ULINT; END_VAR
- VAR_OUTPUT OUT: DINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION ULINT_TO_DATE : DATE
- VAR_INPUT IN: ULINT; END_VAR
- VAR_OUTPUT OUT: DATE; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION ULINT_TO_DWORD : DWORD
- VAR_INPUT IN: ULINT; END_VAR
- VAR_OUTPUT OUT: DWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION ULINT_TO_DT : DT
- VAR_INPUT IN: ULINT; END_VAR
- VAR_OUTPUT OUT: DT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION ULINT_TO_TOD : TOD
- VAR_INPUT IN: ULINT; END_VAR
- VAR_OUTPUT OUT: TOD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION ULINT_TO_UDINT : UDINT
- VAR_INPUT IN: ULINT; END_VAR
- VAR_OUTPUT OUT: UDINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION ULINT_TO_WORD : WORD
- VAR_INPUT IN: ULINT; END_VAR
- VAR_OUTPUT OUT: WORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION ULINT_TO_STRING : STRING
- VAR_INPUT IN: ULINT; END_VAR
- VAR_OUTPUT OUT: STRING; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION ULINT_TO_LWORD : LWORD
- VAR_INPUT IN: ULINT; END_VAR
- VAR_OUTPUT OUT: LWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION ULINT_TO_UINT : UINT
- VAR_INPUT IN: ULINT; END_VAR
- VAR_OUTPUT OUT: UINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION ULINT_TO_LREAL : LREAL
- VAR_INPUT IN: ULINT; END_VAR
- VAR_OUTPUT OUT: LREAL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION ULINT_TO_BYTE : BYTE
- VAR_INPUT IN: ULINT; END_VAR
- VAR_OUTPUT OUT: BYTE; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION ULINT_TO_USINT : USINT
- VAR_INPUT IN: ULINT; END_VAR
- VAR_OUTPUT OUT: USINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION ULINT_TO_BOOL : BOOL
- VAR_INPUT IN: ULINT; END_VAR
- VAR_OUTPUT OUT: BOOL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION ULINT_TO_TIME : TIME
- VAR_INPUT IN: ULINT; END_VAR
- VAR_OUTPUT OUT: TIME; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION ULINT_TO_INT : INT
- VAR_INPUT IN: ULINT; END_VAR
- VAR_OUTPUT OUT: INT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION BOOL_TO_REAL : REAL
- VAR_INPUT IN: BOOL; END_VAR
- VAR_OUTPUT OUT: REAL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION BOOL_TO_SINT : SINT
- VAR_INPUT IN: BOOL; END_VAR
- VAR_OUTPUT OUT: SINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION BOOL_TO_LINT : LINT
- VAR_INPUT IN: BOOL; END_VAR
- VAR_OUTPUT OUT: LINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION BOOL_TO_DINT : DINT
- VAR_INPUT IN: BOOL; END_VAR
- VAR_OUTPUT OUT: DINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION BOOL_TO_DATE : DATE
- VAR_INPUT IN: BOOL; END_VAR
- VAR_OUTPUT OUT: DATE; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION BOOL_TO_DWORD : DWORD
- VAR_INPUT IN: BOOL; END_VAR
- VAR_OUTPUT OUT: DWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION BOOL_TO_DT : DT
- VAR_INPUT IN: BOOL; END_VAR
- VAR_OUTPUT OUT: DT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION BOOL_TO_TOD : TOD
- VAR_INPUT IN: BOOL; END_VAR
- VAR_OUTPUT OUT: TOD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION BOOL_TO_UDINT : UDINT
- VAR_INPUT IN: BOOL; END_VAR
- VAR_OUTPUT OUT: UDINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION BOOL_TO_WORD : WORD
- VAR_INPUT IN: BOOL; END_VAR
- VAR_OUTPUT OUT: WORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION BOOL_TO_STRING : STRING
- VAR_INPUT IN: BOOL; END_VAR
- VAR_OUTPUT OUT: STRING; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION BOOL_TO_LWORD : LWORD
- VAR_INPUT IN: BOOL; END_VAR
- VAR_OUTPUT OUT: LWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION BOOL_TO_UINT : UINT
- VAR_INPUT IN: BOOL; END_VAR
- VAR_OUTPUT OUT: UINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION BOOL_TO_LREAL : LREAL
- VAR_INPUT IN: BOOL; END_VAR
- VAR_OUTPUT OUT: LREAL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION BOOL_TO_BYTE : BYTE
- VAR_INPUT IN: BOOL; END_VAR
- VAR_OUTPUT OUT: BYTE; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION BOOL_TO_USINT : USINT
- VAR_INPUT IN: BOOL; END_VAR
- VAR_OUTPUT OUT: USINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION BOOL_TO_ULINT : ULINT
- VAR_INPUT IN: BOOL; END_VAR
- VAR_OUTPUT OUT: ULINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION BOOL_TO_TIME : TIME
- VAR_INPUT IN: BOOL; END_VAR
- VAR_OUTPUT OUT: TIME; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION BOOL_TO_INT : INT
- VAR_INPUT IN: BOOL; END_VAR
- VAR_OUTPUT OUT: INT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION TIME_TO_REAL : REAL
- VAR_INPUT IN: TIME; END_VAR
- VAR_OUTPUT OUT: REAL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION TIME_TO_SINT : SINT
- VAR_INPUT IN: TIME; END_VAR
- VAR_OUTPUT OUT: SINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION TIME_TO_LINT : LINT
- VAR_INPUT IN: TIME; END_VAR
- VAR_OUTPUT OUT: LINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION TIME_TO_DINT : DINT
- VAR_INPUT IN: TIME; END_VAR
- VAR_OUTPUT OUT: DINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION TIME_TO_DWORD : DWORD
- VAR_INPUT IN: TIME; END_VAR
- VAR_OUTPUT OUT: DWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION TIME_TO_UDINT : UDINT
- VAR_INPUT IN: TIME; END_VAR
- VAR_OUTPUT OUT: UDINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION TIME_TO_WORD : WORD
- VAR_INPUT IN: TIME; END_VAR
- VAR_OUTPUT OUT: WORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION TIME_TO_STRING : STRING
- VAR_INPUT IN: TIME; END_VAR
- VAR_OUTPUT OUT: STRING; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION TIME_TO_LWORD : LWORD
- VAR_INPUT IN: TIME; END_VAR
- VAR_OUTPUT OUT: LWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION TIME_TO_UINT : UINT
- VAR_INPUT IN: TIME; END_VAR
- VAR_OUTPUT OUT: UINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION TIME_TO_LREAL : LREAL
- VAR_INPUT IN: TIME; END_VAR
- VAR_OUTPUT OUT: LREAL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION TIME_TO_BYTE : BYTE
- VAR_INPUT IN: TIME; END_VAR
- VAR_OUTPUT OUT: BYTE; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION TIME_TO_USINT : USINT
- VAR_INPUT IN: TIME; END_VAR
- VAR_OUTPUT OUT: USINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION TIME_TO_ULINT : ULINT
- VAR_INPUT IN: TIME; END_VAR
- VAR_OUTPUT OUT: ULINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION TIME_TO_INT : INT
- VAR_INPUT IN: TIME; END_VAR
- VAR_OUTPUT OUT: INT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION INT_TO_REAL : REAL
- VAR_INPUT IN: INT; END_VAR
- VAR_OUTPUT OUT: REAL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION INT_TO_SINT : SINT
- VAR_INPUT IN: INT; END_VAR
- VAR_OUTPUT OUT: SINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION INT_TO_LINT : LINT
- VAR_INPUT IN: INT; END_VAR
- VAR_OUTPUT OUT: LINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION INT_TO_DINT : DINT
- VAR_INPUT IN: INT; END_VAR
- VAR_OUTPUT OUT: DINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION INT_TO_DATE : DATE
- VAR_INPUT IN: INT; END_VAR
- VAR_OUTPUT OUT: DATE; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION INT_TO_DWORD : DWORD
- VAR_INPUT IN: INT; END_VAR
- VAR_OUTPUT OUT: DWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION INT_TO_DT : DT
- VAR_INPUT IN: INT; END_VAR
- VAR_OUTPUT OUT: DT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION INT_TO_TOD : TOD
- VAR_INPUT IN: INT; END_VAR
- VAR_OUTPUT OUT: TOD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION INT_TO_UDINT : UDINT
- VAR_INPUT IN: INT; END_VAR
- VAR_OUTPUT OUT: UDINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION INT_TO_WORD : WORD
- VAR_INPUT IN: INT; END_VAR
- VAR_OUTPUT OUT: WORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION INT_TO_STRING : STRING
- VAR_INPUT IN: INT; END_VAR
- VAR_OUTPUT OUT: STRING; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION INT_TO_LWORD : LWORD
- VAR_INPUT IN: INT; END_VAR
- VAR_OUTPUT OUT: LWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION INT_TO_UINT : UINT
- VAR_INPUT IN: INT; END_VAR
- VAR_OUTPUT OUT: UINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION INT_TO_LREAL : LREAL
- VAR_INPUT IN: INT; END_VAR
- VAR_OUTPUT OUT: LREAL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION INT_TO_BYTE : BYTE
- VAR_INPUT IN: INT; END_VAR
- VAR_OUTPUT OUT: BYTE; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION INT_TO_USINT : USINT
- VAR_INPUT IN: INT; END_VAR
- VAR_OUTPUT OUT: USINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION INT_TO_ULINT : ULINT
- VAR_INPUT IN: INT; END_VAR
- VAR_OUTPUT OUT: ULINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION INT_TO_BOOL : BOOL
- VAR_INPUT IN: INT; END_VAR
- VAR_OUTPUT OUT: BOOL; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION INT_TO_TIME : TIME
- VAR_INPUT IN: INT; END_VAR
- VAR_OUTPUT OUT: TIME; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DATE_AND_TIME_TO_TIME_OF_DAY : TIME_OF_DAY
- VAR_INPUT IN: DATE_AND_TIME; END_VAR
- VAR_OUTPUT OUT: TIME_OF_DAY; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DATE_AND_TIME_TO_DATE : DATE
- VAR_INPUT IN: DATE_AND_TIME; END_VAR
- VAR_OUTPUT OUT: DATE; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-(* *BCD_TO_** and **_TO_BCD* are not yet supported *)
-(* We comment them out for now... *)
-(*
-
-
-FUNCTION UDINT_TO_BCD_BYTE : BYTE
- VAR_INPUT IN: UDINT; END_VAR
- VAR_OUTPUT OUT: BYTE; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION UDINT_TO_BCD_WORD : WORD
- VAR_INPUT IN: UDINT; END_VAR
- VAR_OUTPUT OUT: WORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION UDINT_TO_BCD_DWORD : DWORD
- VAR_INPUT IN: UDINT; END_VAR
- VAR_OUTPUT OUT: DWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION UDINT_TO_BCD_LWORD : LWORD
- VAR_INPUT IN: UDINT; END_VAR
- VAR_OUTPUT OUT: LWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION UINT_TO_BCD_BYTE : BYTE
- VAR_INPUT IN: UINT; END_VAR
- VAR_OUTPUT OUT: BYTE; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION UINT_TO_BCD_WORD : WORD
- VAR_INPUT IN: UINT; END_VAR
- VAR_OUTPUT OUT: WORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION UINT_TO_BCD_DWORD : DWORD
- VAR_INPUT IN: UINT; END_VAR
- VAR_OUTPUT OUT: DWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION UINT_TO_BCD_LWORD : LWORD
- VAR_INPUT IN: UINT; END_VAR
- VAR_OUTPUT OUT: LWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION USINT_TO_BCD_BYTE : BYTE
- VAR_INPUT IN: USINT; END_VAR
- VAR_OUTPUT OUT: BYTE; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION USINT_TO_BCD_WORD : WORD
- VAR_INPUT IN: USINT; END_VAR
- VAR_OUTPUT OUT: WORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION USINT_TO_BCD_DWORD : DWORD
- VAR_INPUT IN: USINT; END_VAR
- VAR_OUTPUT OUT: DWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION USINT_TO_BCD_LWORD : LWORD
- VAR_INPUT IN: USINT; END_VAR
- VAR_OUTPUT OUT: LWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION ULINT_TO_BCD_BYTE : BYTE
- VAR_INPUT IN: ULINT; END_VAR
- VAR_OUTPUT OUT: BYTE; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION ULINT_TO_BCD_WORD : WORD
- VAR_INPUT IN: ULINT; END_VAR
- VAR_OUTPUT OUT: WORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION ULINT_TO_BCD_DWORD : DWORD
- VAR_INPUT IN: ULINT; END_VAR
- VAR_OUTPUT OUT: DWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION ULINT_TO_BCD_LWORD : LWORD
- VAR_INPUT IN: ULINT; END_VAR
- VAR_OUTPUT OUT: LWORD; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION BYTE_BCD_TO_UDINT : UDINT
- VAR_INPUT IN: BYTE; END_VAR
- VAR_OUTPUT OUT: UDINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION WORD_BCD_TO_UDINT : UDINT
- VAR_INPUT IN: WORD; END_VAR
- VAR_OUTPUT OUT: UDINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DWORD_BCD_TO_UDINT : UDINT
- VAR_INPUT IN: DWORD; END_VAR
- VAR_OUTPUT OUT: UDINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LWORD_BCD_TO_UDINT : UDINT
- VAR_INPUT IN: LWORD; END_VAR
- VAR_OUTPUT OUT: UDINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION BYTE_BCD_TO_UINT : UINT
- VAR_INPUT IN: BYTE; END_VAR
- VAR_OUTPUT OUT: UINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION WORD_BCD_TO_UINT : UINT
- VAR_INPUT IN: WORD; END_VAR
- VAR_OUTPUT OUT: UINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DWORD_BCD_TO_UINT : UINT
- VAR_INPUT IN: DWORD; END_VAR
- VAR_OUTPUT OUT: UINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LWORD_BCD_TO_UINT : UINT
- VAR_INPUT IN: LWORD; END_VAR
- VAR_OUTPUT OUT: UINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION BYTE_BCD_TO_USINT : USINT
- VAR_INPUT IN: BYTE; END_VAR
- VAR_OUTPUT OUT: USINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION WORD_BCD_TO_USINT : USINT
- VAR_INPUT IN: WORD; END_VAR
- VAR_OUTPUT OUT: USINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DWORD_BCD_TO_USINT : USINT
- VAR_INPUT IN: DWORD; END_VAR
- VAR_OUTPUT OUT: USINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LWORD_BCD_TO_USINT : USINT
- VAR_INPUT IN: LWORD; END_VAR
- VAR_OUTPUT OUT: USINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION BYTE_BCD_TO_ULINT : ULINT
- VAR_INPUT IN: BYTE; END_VAR
- VAR_OUTPUT OUT: ULINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION WORD_BCD_TO_ULINT : ULINT
- VAR_INPUT IN: WORD; END_VAR
- VAR_OUTPUT OUT: ULINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION DWORD_BCD_TO_ULINT : ULINT
- VAR_INPUT IN: DWORD; END_VAR
- VAR_OUTPUT OUT: ULINT; END_VAR
- LD TRUE
-END_FUNCTION
-
-
-FUNCTION LWORD_BCD_TO_ULINT : ULINT
- VAR_INPUT IN: LWORD; END_VAR
- VAR_OUTPUT OUT: ULINT; END_VAR
- LD TRUE
-END_FUNCTION
-*)
-
-{enable code generation}
diff -r 050d31dd7c74 -r c0453b7f99df lib/test_iec_std_lib.c
--- a/lib/test_iec_std_lib.c Mon Apr 04 19:18:22 2011 +0200
+++ b/lib/test_iec_std_lib.c Tue Apr 05 15:14:19 2011 +0200
@@ -1,3 +1,29 @@
+/*
+ * matiec - a compiler for the programming languages defined in IEC 61131-3
+ *
+ * Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ *
+ * This code is made available on the understanding that it will not be
+ * used in safety-critical situations without a full and competent review.
+ *
+ * Test bed for C implementation of standard IEC functions.
+ *
+ */
#include "iec_std_lib.h"
diff -r 050d31dd7c74 -r c0453b7f99df main.cc
--- a/main.cc Mon Apr 04 19:18:22 2011 +0200
+++ b/main.cc Tue Apr 05 15:14:19 2011 +0200
@@ -1,6 +1,7 @@
/*
* matiec - a compiler for the programming languages defined in IEC 61131-3
* Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df stage1_2/Makefile
--- a/stage1_2/Makefile Mon Apr 04 19:18:22 2011 +0200
+++ b/stage1_2/Makefile Tue Apr 05 15:14:19 2011 +0200
@@ -1,3 +1,21 @@
+# matiec - a compiler for the programming languages defined in IEC 61131-3
+#
+# Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+# Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
# include the system specific Makefile
include ../Makefile.$(shell uname)
diff -r 050d31dd7c74 -r c0453b7f99df stage1_2/iec.y
--- a/stage1_2/iec.y Mon Apr 04 19:18:22 2011 +0200
+++ b/stage1_2/iec.y Tue Apr 05 15:14:19 2011 +0200
@@ -2,6 +2,7 @@
* matiec - a compiler for the programming languages defined in IEC 61131-3
*
* Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df stage1_2/stage1_2.cc
--- a/stage1_2/stage1_2.cc Mon Apr 04 19:18:22 2011 +0200
+++ b/stage1_2/stage1_2.cc Tue Apr 05 15:14:19 2011 +0200
@@ -2,6 +2,7 @@
* matiec - a compiler for the programming languages defined in IEC 61131-3
*
* Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df stage1_2/stage1_2.hh
--- a/stage1_2/stage1_2.hh Mon Apr 04 19:18:22 2011 +0200
+++ b/stage1_2/stage1_2.hh Tue Apr 05 15:14:19 2011 +0200
@@ -2,6 +2,7 @@
* matiec - a compiler for the programming languages defined in IEC 61131-3
*
* Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df stage1_2/stage1_2_priv.hh
--- a/stage1_2/stage1_2_priv.hh Mon Apr 04 19:18:22 2011 +0200
+++ b/stage1_2/stage1_2_priv.hh Tue Apr 05 15:14:19 2011 +0200
@@ -2,6 +2,7 @@
* matiec - a compiler for the programming languages defined in IEC 61131-3
*
* Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df stage1_2/standard_function_names.c
--- a/stage1_2/standard_function_names.c Mon Apr 04 19:18:22 2011 +0200
+++ b/stage1_2/standard_function_names.c Tue Apr 05 15:14:19 2011 +0200
@@ -1,31 +1,20 @@
/*
- * matiec - a compiler for the programming languages defined in IEC 61131-3
+ * Copyright (C) 2007-2011: Edouard TISSERANT and Laurent BESSARD
*
- * Copyright (C) 2008 Edouard TISSERANT
+ * See COPYING and COPYING.LESSER files for copyright details.
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- *
- *
- * This code is made available on the understanding that it will not be
- * used in safety-critical situations without a full and competent review.
- */
-
-/*
- * An IEC 61131-3 compiler.
- *
- * Based on the
- * FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10)
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*
*/
@@ -423,9 +412,19 @@
"ACOS",
"ATAN",
"ADD",
+"ADD_TIME",
+"ADD_TOD_TIME",
+"ADD_DT_TIME",
"MUL",
+"MULTIME",
"SUB",
+"SUB_TIME",
+"SUB_DATE_DATE",
+"SUB_TOD_TIME",
+"SUB_TOD_TOD",
+"SUB_DT_TIME",
"DIV",
+"DIVTIME",
"MOD",
"EXPT",
"MOVE",
@@ -453,6 +452,7 @@
"RIGHT",
"MID",
"CONCAT",
+"CONCAT_DAT_TOD",
"INSERT",
"DELETE",
"REPLACE",
diff -r 050d31dd7c74 -r c0453b7f99df stage3/Makefile
--- a/stage3/Makefile Mon Apr 04 19:18:22 2011 +0200
+++ b/stage3/Makefile Tue Apr 05 15:14:19 2011 +0200
@@ -1,9 +1,24 @@
+# matiec - a compiler for the programming languages defined in IEC 61131-3
+#
+# Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+# Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
# include the system specific Makefile
include ../Makefile.$(shell uname)
-
-
-
STAGE3_FILES = stage3.o
STAGE3_FILES += visit_expression_type.o
diff -r 050d31dd7c74 -r c0453b7f99df stage3/stage3.cc
--- a/stage3/stage3.cc Mon Apr 04 19:18:22 2011 +0200
+++ b/stage3/stage3.cc Tue Apr 05 15:14:19 2011 +0200
@@ -2,6 +2,7 @@
* matiec - a compiler for the programming languages defined in IEC 61131-3
*
* Copyright (C) 2009-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df stage3/stage3.hh
--- a/stage3/stage3.hh Mon Apr 04 19:18:22 2011 +0200
+++ b/stage3/stage3.hh Tue Apr 05 15:14:19 2011 +0200
@@ -2,6 +2,7 @@
* matiec - a compiler for the programming languages defined in IEC 61131-3
*
* Copyright (C) 2009-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df stage3/visit_expression_type.cc
--- a/stage3/visit_expression_type.cc Mon Apr 04 19:18:22 2011 +0200
+++ b/stage3/visit_expression_type.cc Tue Apr 05 15:14:19 2011 +0200
@@ -2,6 +2,7 @@
* matiec - a compiler for the programming languages defined in IEC 61131-3
*
* Copyright (C) 2009-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df stage3/visit_expression_type.hh
--- a/stage3/visit_expression_type.hh Mon Apr 04 19:18:22 2011 +0200
+++ b/stage3/visit_expression_type.hh Tue Apr 05 15:14:19 2011 +0200
@@ -2,6 +2,7 @@
* matiec - a compiler for the programming languages defined in IEC 61131-3
*
* Copyright (C) 2009-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df stage4/Makefile
--- a/stage4/Makefile Mon Apr 04 19:18:22 2011 +0200
+++ b/stage4/Makefile Tue Apr 05 15:14:19 2011 +0200
@@ -1,4 +1,22 @@
+# matiec - a compiler for the programming languages defined in IEC 61131-3
+#
+# Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+# Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
# include the system specific Makefile
+
include ../Makefile.$(shell uname)
diff -r 050d31dd7c74 -r c0453b7f99df stage4/generate_c/Makefile
--- a/stage4/generate_c/Makefile Mon Apr 04 19:18:22 2011 +0200
+++ b/stage4/generate_c/Makefile Tue Apr 05 15:14:19 2011 +0200
@@ -1,3 +1,21 @@
+# matiec - a compiler for the programming languages defined in IEC 61131-3
+#
+# Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+# Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
# include the system specific Makefile
include ../../Makefile.$(shell uname)
diff -r 050d31dd7c74 -r c0453b7f99df stage4/generate_c/generate_c.cc
--- a/stage4/generate_c/generate_c.cc Mon Apr 04 19:18:22 2011 +0200
+++ b/stage4/generate_c/generate_c.cc Tue Apr 05 15:14:19 2011 +0200
@@ -2,6 +2,7 @@
* matiec - a compiler for the programming languages defined in IEC 61131-3
*
* Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -21,28 +22,6 @@
* used in safety-critical situations without a full and competent review.
*/
-/*
- * An IEC 61131-3 compiler.
- *
- * Based on the
- * FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10)
- *
- */
-
-
-/*
- * This is one of the versions available for the 4th stage.
- *
- * This 4th stage generates a c++ source program equivalent
- * to the IL and ST code.
- */
-
-
-
-
-
-
-// #include /* required for NULL */
#include
#include
#include
@@ -57,12 +36,6 @@
#include "../stage4.hh"
-
-
-
-
-
-
//#define DEBUG
#ifdef DEBUG
#define TRACE(classname) printf("\n____%s____\n",classname);
@@ -70,18 +43,10 @@
#define TRACE(classname)
#endif
-
-
#define ERROR error_exit(__FILE__,__LINE__)
/* function defined in main.cc */
extern void error_exit(const char *file_name, int line_no);
-
-
-
-/***********************************************************************/
-/***********************************************************************/
-/***********************************************************************/
/***********************************************************************/
/* Unlike Programs and Configurations which get mapped onto C++ classes,
diff -r 050d31dd7c74 -r c0453b7f99df stage4/generate_c/generate_c.hh
--- a/stage4/generate_c/generate_c.hh Mon Apr 04 19:18:22 2011 +0200
+++ b/stage4/generate_c/generate_c.hh Tue Apr 05 15:14:19 2011 +0200
@@ -2,6 +2,7 @@
* matiec - a compiler for the programming languages defined in IEC 61131-3
*
* Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff -r 050d31dd7c74 -r c0453b7f99df stage4/generate_c/generate_c_base.cc
--- a/stage4/generate_c/generate_c_base.cc Mon Apr 04 19:18:22 2011 +0200
+++ b/stage4/generate_c/generate_c_base.cc Tue Apr 05 15:14:19 2011 +0200
@@ -1,49 +1,27 @@
/*
- * (c) 2003 Mario de Sousa
+ * matiec - a compiler for the programming languages defined in IEC 61131-3
*
- * Offered to the public under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
+ * Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
- * Public License for more details.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
*
* This code is made available on the understanding that it will not be
* used in safety-critical situations without a full and competent review.
*/
-/*
- * An IEC 61131-3 IL and ST compiler.
- *
- * Based on the
- * FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10)
- *
- */
-
-
-/*
- * Conversion of basic abstract syntax constructs.
- *
- * This is part of the 4th stage that generates
- * a c++ source program equivalent to the IL and ST
- * code.
- */
-
-
-
-
-
-
-//#include /* required for NULL */
-//#include
-//#include
-
-//#include "../../util/symtable.hh"
-
-//#include "generate_c.hh"
-
#include
diff -r 050d31dd7c74 -r c0453b7f99df stage4/generate_c/generate_c_configbody.cc
--- a/stage4/generate_c/generate_c_configbody.cc Mon Apr 04 19:18:22 2011 +0200
+++ b/stage4/generate_c/generate_c_configbody.cc Tue Apr 05 15:14:19 2011 +0200
@@ -1,56 +1,27 @@
/*
- * (c) 2003 Mario de Sousa
+ * matiec - a compiler for the programming languages defined in IEC 61131-3
*
- * Offered to the public under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
+ * Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
- * Public License for more details.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
*
* This code is made available on the understanding that it will not be
* used in safety-critical situations without a full and competent review.
*/
-/*
- * An IEC 61131-3 IL and ST compiler.
- *
- * Based on the
- * FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10)
- *
- */
-
-
-/*
- * Build the body of the main function (currently named run() )
- * of the class onto which is mapped a specific CONFIGURATION.
- *
- * This is part of the 4th stage that generates
- * a c++ source program equivalent to the IL and ST
- * code.
- */
-
-
-
-
-
-
-// #include /* required for NULL */
-/*
-#include
-#include
-
-#include "../../util/symtable.hh"
-
-#include "../stage4.hh"
-*/
-
-
-
-
-
class generate_c_configbody_c: public generate_c_base_c {
public:
diff -r 050d31dd7c74 -r c0453b7f99df stage4/generate_c/generate_c_il.cc
--- a/stage4/generate_c/generate_c_il.cc Mon Apr 04 19:18:22 2011 +0200
+++ b/stage4/generate_c/generate_c_il.cc Tue Apr 05 15:14:19 2011 +0200
@@ -1,39 +1,27 @@
/*
- * (c) 2003 Mario de Sousa
+ * matiec - a compiler for the programming languages defined in IEC 61131-3
*
- * Offered to the public under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
+ * Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
- * Public License for more details.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
*
* This code is made available on the understanding that it will not be
* used in safety-critical situations without a full and competent review.
*/
-/*
- * An IEC 61131-3 IL and ST compiler.
- *
- * Based on the
- * FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10)
- *
- */
-
-
-/*
- * Conversion of il statements (i.e. IL code).
- *
- * This is part of the 4th stage that generates
- * a c++ source program equivalent to the IL and ST
- * code.
- */
-
-
-
-
/***********************************************************************/
/***********************************************************************/
/***********************************************************************/
diff -r 050d31dd7c74 -r c0453b7f99df stage4/generate_c/generate_c_inlinefcall.cc
--- a/stage4/generate_c/generate_c_inlinefcall.cc Mon Apr 04 19:18:22 2011 +0200
+++ b/stage4/generate_c/generate_c_inlinefcall.cc Tue Apr 05 15:14:19 2011 +0200
@@ -1,34 +1,27 @@
/*
- * (c) 2007 Mario de Sousa and Laurent Bessard
+ * matiec - a compiler for the programming languages defined in IEC 61131-3
*
- * Offered to the public under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
+ * Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
- * Public License for more details.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
*
* This code is made available on the understanding that it will not be
* used in safety-critical situations without a full and competent review.
*/
-/*
- * An IEC 61131-3 IL and ST compiler.
- *
- * Based on the
- * FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10)
- *
- */
-
-/*
- * This is one of the versions available for the 4th stage.
- *
- * This 4th stage generates a c++ source program equivalent
- * to the IL and ST code.
- */
-
#define INLINE_RESULT_TEMP_VAR "__res"
diff -r 050d31dd7c74 -r c0453b7f99df stage4/generate_c/generate_c_sfc.cc
--- a/stage4/generate_c/generate_c_sfc.cc Mon Apr 04 19:18:22 2011 +0200
+++ b/stage4/generate_c/generate_c_sfc.cc Tue Apr 05 15:14:19 2011 +0200
@@ -1,36 +1,27 @@
/*
- * (c) 2007 Mario de Sousa, Laurent Bessard
+ * matiec - a compiler for the programming languages defined in IEC 61131-3
*
- * Offered to the public under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
+ * Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
- * Public License for more details.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
*
* This code is made available on the understanding that it will not be
* used in safety-critical situations without a full and competent review.
*/
-/*
- * An IEC 61131-3 IL and ST compiler.
- *
- * Based on the
- * FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10)
- *
- */
-
-
-/*
- * Conversion of sfc networks (i.e. SFC code).
- *
- * This is part of the 4th stage that generates
- * a c++ source program equivalent to the SFC, IL and ST
- * code.
- */
-
typedef struct
{
transition_c *symbol;
diff -r 050d31dd7c74 -r c0453b7f99df stage4/generate_c/generate_c_sfcdecl.cc
--- a/stage4/generate_c/generate_c_sfcdecl.cc Mon Apr 04 19:18:22 2011 +0200
+++ b/stage4/generate_c/generate_c_sfcdecl.cc Tue Apr 05 15:14:19 2011 +0200
@@ -1,36 +1,27 @@
/*
- * (c) 2007 Mario de Sousa, Laurent Bessard
- *
- * Offered to the public under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
- * Public License for more details.
+ * matiec - a compiler for the programming languages defined in IEC 61131-3
+ *
+ * Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
*
* This code is made available on the understanding that it will not be
* used in safety-critical situations without a full and competent review.
*/
-/*
- * An IEC 61131-3 IL and ST compiler.
- *
- * Based on the
- * FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10)
- *
- */
-
-
-/*
- * Conversion of sfc networks (i.e. SFC code).
- *
- * This is part of the 4th stage that generates
- * a c++ source program equivalent to the SFC, IL and ST
- * code.
- */
-
typedef struct
{
identifier_c *symbol;
diff -r 050d31dd7c74 -r c0453b7f99df stage4/generate_c/generate_c_st.cc
--- a/stage4/generate_c/generate_c_st.cc Mon Apr 04 19:18:22 2011 +0200
+++ b/stage4/generate_c/generate_c_st.cc Tue Apr 05 15:14:19 2011 +0200
@@ -1,21 +1,24 @@
/*
- * (c) 2003 Mario de Sousa
+ * matiec - a compiler for the programming languages defined in IEC 61131-3
*
- * Offered to the public under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
+ * Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
- * Public License for more details.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*
* This code is made available on the understanding that it will not be
* used in safety-critical situations without a full and competent review.
- */
-
-/*
- * An IEC 61131-3 IL and ST compiler.
*
* Based on the
* FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10)
@@ -27,7 +30,7 @@
* Conversion of st statements (i.e. ST code).
*
* This is part of the 4th stage that generates
- * a c++ source program equivalent to the IL and ST
+ * a C source program equivalent to the IL and ST, or SFC
* code.
*/
diff -r 050d31dd7c74 -r c0453b7f99df stage4/generate_c/generate_c_typedecl.cc
--- a/stage4/generate_c/generate_c_typedecl.cc Mon Apr 04 19:18:22 2011 +0200
+++ b/stage4/generate_c/generate_c_typedecl.cc Tue Apr 05 15:14:19 2011 +0200
@@ -1,51 +1,28 @@
/*
- * (c) 2003 Mario de Sousa
- *
- * Offered to the public under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
- * Public License for more details.
+ * matiec - a compiler for the programming languages defined in IEC 61131-3
+ *
+ * Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
*
* This code is made available on the understanding that it will not be
* used in safety-critical situations without a full and competent review.
*/
-
-/*
- * An IEC 61131-3 IL and ST compiler.
- *
- * Based on the
- * FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10)
- *
- */
-
-
-/*
- * Conversion of type declaration constructs.
- *
- * This is part of the 4th stage that generates
- * a c++ source program equivalent to the IL and ST
- * code.
- */
-
-
-
-
-
-
-//#include /* required for NULL */
-//#include
-//#include
-
-//#include "../../util/symtable.hh"
-
-
#include
-
class generate_c_typedecl_c: public generate_c_base_c {
protected:
diff -r 050d31dd7c74 -r c0453b7f99df stage4/generate_c/generate_c_vardecl.cc
--- a/stage4/generate_c/generate_c_vardecl.cc Mon Apr 04 19:18:22 2011 +0200
+++ b/stage4/generate_c/generate_c_vardecl.cc Tue Apr 05 15:14:19 2011 +0200
@@ -1,45 +1,27 @@
/*
- * (c) 2003 Mario de Sousa
+ * matiec - a compiler for the programming languages defined in IEC 61131-3
*
- * Offered to the public under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
+ * Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
- * Public License for more details.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
*
* This code is made available on the understanding that it will not be
* used in safety-critical situations without a full and competent review.
*/
-/*
- * An IEC 61131-3 IL and ST compiler.
- *
- * Based on the
- * FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10)
- *
- */
-
-
-/*
- * Conversion of variable declaration constructs.
- *
- * This is part of the 4th stage that generates
- * a c++ source program equivalent to the IL and ST
- * code.
- */
-
-
-
-
-//#include /* required for NULL */
-//#include
-//#include
-
-//#include "../../util/symtable.hh"
-
class initialization_analyzer_c: public null_visitor_c {
public:
typedef enum {
diff -r 050d31dd7c74 -r c0453b7f99df stage4/generate_c/generate_location_list.cc
--- a/stage4/generate_c/generate_location_list.cc Mon Apr 04 19:18:22 2011 +0200
+++ b/stage4/generate_c/generate_location_list.cc Tue Apr 05 15:14:19 2011 +0200
@@ -1,57 +1,27 @@
/*
- * (c) 2007 Mario de Sousa and Laurent Bessard
+ * matiec - a compiler for the programming languages defined in IEC 61131-3
*
- * Offered to the public under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
+ * Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
- * Public License for more details.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
*
* This code is made available on the understanding that it will not be
* used in safety-critical situations without a full and competent review.
*/
-/*
- * An IEC 61131-3 IL and ST compiler.
- *
- * Based on the
- * FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10)
- *
- */
-
-/*
- * This is one of the versions available for the 4th stage.
- *
- * This 4th stage generates a c++ source program equivalent
- * to the IL and ST code.
- */
-
-//#include /* required for NULL */
-//#include
-//#include
-
-//#include "../../util/symtable.hh"
-
-
-
-
-
-
-
-
-
-/***********************************************************************/
-/***********************************************************************/
-/***********************************************************************/
-/***********************************************************************/
-/***********************************************************************/
-/***********************************************************************/
-/***********************************************************************/
-/***********************************************************************/
-
class generate_location_list_c: public iterator_visitor_c {
protected:
diff -r 050d31dd7c74 -r c0453b7f99df stage4/generate_c/generate_var_list.cc
--- a/stage4/generate_c/generate_var_list.cc Mon Apr 04 19:18:22 2011 +0200
+++ b/stage4/generate_c/generate_var_list.cc Tue Apr 05 15:14:19 2011 +0200
@@ -1,43 +1,30 @@
/*
- * (c) 2007 Mario de Sousa and Laurent Bessard
+ * matiec - a compiler for the programming languages defined in IEC 61131-3
*
- * Offered to the public under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
+ * Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+ * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
*
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
- * Public License for more details.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*
* This code is made available on the understanding that it will not be
* used in safety-critical situations without a full and competent review.
- */
-
-/*
- * An IEC 61131-3 IL and ST compiler.
*
* Based on the
* FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10)
*
*/
-/*
- * This is one of the versions available for the 4th stage.
- *
- * This 4th stage generates a c++ source program equivalent
- * to the IL and ST code.
- */
-
-//#include /* required for NULL */
-//#include
-//#include
-
-//#include "../../util/symtable.hh"
-
-
-
-
typedef struct
{
symbol_c *symbol;
diff -r 050d31dd7c74 -r c0453b7f99df stage4/generate_c/il_code_gen.c
--- a/stage4/generate_c/il_code_gen.c Mon Apr 04 19:18:22 2011 +0200
+++ b/stage4/generate_c/il_code_gen.c Tue Apr 05 15:14:19 2011 +0200
@@ -1,24 +1,20 @@
/*
- * (c) 2008 Edouard TISSERANT
+ * Copyright (C) 2007-2011: Edouard TISSERANT and Laurent BESSARD
*
- * Offered to the public under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
+ * See COPYING and COPYING.LESSER files for copyright details.
*
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
- * Public License for more details.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * This code is made available on the understanding that it will not be
- * used in safety-critical situations without a full and competent review.
- */
-
-/*
- * An IEC 61131-3 IL and ST compiler.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * Based on the
- * FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10)
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*
*/
@@ -14372,6 +14368,192 @@
break;
/****
+ *ADD_TIME
+ */
+ case function_add_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN1_param_value = &this->default_variable_name;
+
+ symbol_c *IN1_type_symbol = param_data_type;
+ last_type_symbol = param_data_type;
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ {
+
+ {
+ symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
+ symbol_c *IN2_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN2_param_value == NULL)
+ IN2_param_value = function_call_param_iterator.next_nf();
+ if (IN2_param_value != NULL) {
+ IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+ last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_add"));
+
+ if (IN1_type_symbol == NULL)
+ IN1_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+
+ if (IN2_type_symbol == NULL)
+ IN2_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_add_time*/
+ break;
+
+/****
+ *ADD_TOD_TIME
+ */
+ case function_add_tod_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN1_param_value = &this->default_variable_name;
+
+ symbol_c *IN1_type_symbol = param_data_type;
+ last_type_symbol = param_data_type;
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+ {
+
+ {
+ symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
+ symbol_c *IN2_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN2_param_value == NULL)
+ IN2_param_value = function_call_param_iterator.next_nf();
+ if (IN2_param_value != NULL) {
+ IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+ last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_add"));
+
+ if (IN1_type_symbol == NULL)
+ IN1_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+
+ if (IN2_type_symbol == NULL)
+ IN2_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
+ symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_add_tod_time*/
+ break;
+
+/****
+ *ADD_DT_TIME
+ */
+ case function_add_dt_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN1_param_value = &this->default_variable_name;
+
+ symbol_c *IN1_type_symbol = param_data_type;
+ last_type_symbol = param_data_type;
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+ {
+
+ {
+ symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
+ symbol_c *IN2_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN2_param_value == NULL)
+ IN2_param_value = function_call_param_iterator.next_nf();
+ if (IN2_param_value != NULL) {
+ IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+ last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_add"));
+
+ if (IN1_type_symbol == NULL)
+ IN1_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+
+ if (IN2_type_symbol == NULL)
+ IN2_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_add_dt_time*/
+ break;
+
+/****
*MUL
*/
case function_mul :
@@ -14508,9 +14690,9 @@
break;
/****
- *SUB
- */
- case function_sub :
+ *MULTIME
+ */
+ case function_multime :
{
symbol_c *last_type_symbol = NULL;
@@ -14522,7 +14704,7 @@
symbol_c *IN1_type_symbol = param_data_type;
last_type_symbol = param_data_type;
- if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
{
{
@@ -14542,7 +14724,7 @@
if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
{
- function_name = (symbol_c*)(new pragma_c("__sub_"));
+ function_name = (symbol_c*)(new pragma_c("__time_mul"));
if (IN1_type_symbol == NULL)
IN1_type_symbol = last_type_symbol;
@@ -14551,8 +14733,9 @@
if (IN2_type_symbol == NULL)
IN2_type_symbol = last_type_symbol;
ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
- symbol_c * return_type_symbol = last_type_symbol;
- function_type_suffix = return_type_symbol;
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ if (search_expression_type->is_literal_integer_type(function_type_suffix))
+ function_type_suffix = &search_constant_type_c::lint_type_name;
break;
}
@@ -14563,7 +14746,29 @@
}
- if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+
+ ERROR;
+ }
+
+ }/*function_multime*/
+ break;
+
+/****
+ *SUB
+ */
+ case function_sub :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN1_param_value = &this->default_variable_name;
+
+ symbol_c *IN1_type_symbol = param_data_type;
+ last_type_symbol = param_data_type;
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
{
{
@@ -14580,10 +14785,10 @@
last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
}
- if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+ if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
{
- function_name = (symbol_c*)(new pragma_c("__time_sub"));
+ function_name = (symbol_c*)(new pragma_c("__sub_"));
if (IN1_type_symbol == NULL)
IN1_type_symbol = last_type_symbol;
@@ -14592,7 +14797,8 @@
if (IN2_type_symbol == NULL)
IN2_type_symbol = last_type_symbol;
ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ symbol_c * return_type_symbol = last_type_symbol;
+ function_type_suffix = return_type_symbol;
break;
}
@@ -14603,7 +14809,7 @@
}
- if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
{
{
@@ -14620,7 +14826,7 @@
last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
}
- if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
{
function_name = (symbol_c*)(new pragma_c("__time_sub"));
@@ -14637,30 +14843,13 @@
}
- if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
- {
-
- function_name = (symbol_c*)(new pragma_c("__time_sub"));
-
- if (IN1_type_symbol == NULL)
- IN1_type_symbol = last_type_symbol;
- ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
-
- if (IN2_type_symbol == NULL)
- IN2_type_symbol = last_type_symbol;
- ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- break;
-
- }
-
ERROR;
}
}
- if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
{
{
@@ -14677,7 +14866,7 @@
last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
}
- if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
{
function_name = (symbol_c*)(new pragma_c("__time_sub"));
@@ -14706,7 +14895,7 @@
if (IN2_type_symbol == NULL)
IN2_type_symbol = last_type_symbol;
ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
- symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
break;
}
@@ -14717,7 +14906,7 @@
}
- if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
{
{
@@ -14734,7 +14923,7 @@
last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
}
- if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
{
function_name = (symbol_c*)(new pragma_c("__time_sub"));
@@ -14751,35 +14940,30 @@
}
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_sub"));
+
+ if (IN1_type_symbol == NULL)
+ IN1_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+
+ if (IN2_type_symbol == NULL)
+ IN2_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
+ symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
+ break;
+
+ }
+
ERROR;
}
}
-
- ERROR;
- }
-
- }/*function_sub*/
- break;
-
-/****
- *DIV
- */
- case function_div :
- {
- symbol_c *last_type_symbol = NULL;
-
- {
- symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN1_param_value = &this->default_variable_name;
-
- symbol_c *IN1_type_symbol = param_data_type;
- last_type_symbol = param_data_type;
-
- if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
{
{
@@ -14796,10 +14980,10 @@
last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
}
- if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
{
- function_name = (symbol_c*)(new pragma_c("__div_"));
+ function_name = (symbol_c*)(new pragma_c("__time_sub"));
if (IN1_type_symbol == NULL)
IN1_type_symbol = last_type_symbol;
@@ -14808,8 +14992,7 @@
if (IN2_type_symbol == NULL)
IN2_type_symbol = last_type_symbol;
ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
- symbol_c * return_type_symbol = last_type_symbol;
- function_type_suffix = return_type_symbol;
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
break;
}
@@ -14820,6 +15003,28 @@
}
+
+ ERROR;
+ }
+
+ }/*function_sub*/
+ break;
+
+/****
+ *SUB_TIME
+ */
+ case function_sub_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN1_param_value = &this->default_variable_name;
+
+ symbol_c *IN1_type_symbol = param_data_type;
+ last_type_symbol = param_data_type;
+
if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
{
@@ -14837,6 +15042,374 @@
last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
}
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_sub"));
+
+ if (IN1_type_symbol == NULL)
+ IN1_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+
+ if (IN2_type_symbol == NULL)
+ IN2_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sub_time*/
+ break;
+
+/****
+ *SUB_DATE_DATE
+ */
+ case function_sub_date_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN1_param_value = &this->default_variable_name;
+
+ symbol_c *IN1_type_symbol = param_data_type;
+ last_type_symbol = param_data_type;
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+ {
+
+ {
+ symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
+ symbol_c *IN2_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN2_param_value == NULL)
+ IN2_param_value = function_call_param_iterator.next_nf();
+ if (IN2_param_value != NULL) {
+ IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+ last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_sub"));
+
+ if (IN1_type_symbol == NULL)
+ IN1_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+
+ if (IN2_type_symbol == NULL)
+ IN2_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sub_date_date*/
+ break;
+
+/****
+ *SUB_TOD_TIME
+ */
+ case function_sub_tod_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN1_param_value = &this->default_variable_name;
+
+ symbol_c *IN1_type_symbol = param_data_type;
+ last_type_symbol = param_data_type;
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+ {
+
+ {
+ symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
+ symbol_c *IN2_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN2_param_value == NULL)
+ IN2_param_value = function_call_param_iterator.next_nf();
+ if (IN2_param_value != NULL) {
+ IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+ last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_sub"));
+
+ if (IN1_type_symbol == NULL)
+ IN1_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+
+ if (IN2_type_symbol == NULL)
+ IN2_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
+ symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sub_tod_time*/
+ break;
+
+/****
+ *SUB_TOD_TOD
+ */
+ case function_sub_tod_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN1_param_value = &this->default_variable_name;
+
+ symbol_c *IN1_type_symbol = param_data_type;
+ last_type_symbol = param_data_type;
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+ {
+
+ {
+ symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
+ symbol_c *IN2_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN2_param_value == NULL)
+ IN2_param_value = function_call_param_iterator.next_nf();
+ if (IN2_param_value != NULL) {
+ IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+ last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_sub"));
+
+ if (IN1_type_symbol == NULL)
+ IN1_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+
+ if (IN2_type_symbol == NULL)
+ IN2_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sub_tod_tod*/
+ break;
+
+/****
+ *SUB_DT_TIME
+ */
+ case function_sub_dt_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN1_param_value = &this->default_variable_name;
+
+ symbol_c *IN1_type_symbol = param_data_type;
+ last_type_symbol = param_data_type;
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+ {
+
+ {
+ symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
+ symbol_c *IN2_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN2_param_value == NULL)
+ IN2_param_value = function_call_param_iterator.next_nf();
+ if (IN2_param_value != NULL) {
+ IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+ last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_sub"));
+
+ if (IN1_type_symbol == NULL)
+ IN1_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+
+ if (IN2_type_symbol == NULL)
+ IN2_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ break;
+
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_sub"));
+
+ if (IN1_type_symbol == NULL)
+ IN1_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+
+ if (IN2_type_symbol == NULL)
+ IN2_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sub_dt_time*/
+ break;
+
+/****
+ *DIV
+ */
+ case function_div :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN1_param_value = &this->default_variable_name;
+
+ symbol_c *IN1_type_symbol = param_data_type;
+ last_type_symbol = param_data_type;
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
+ {
+
+ {
+ symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
+ symbol_c *IN2_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN2_param_value == NULL)
+ IN2_param_value = function_call_param_iterator.next_nf();
+ if (IN2_param_value != NULL) {
+ IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+ last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__div_"));
+
+ if (IN1_type_symbol == NULL)
+ IN1_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+
+ if (IN2_type_symbol == NULL)
+ IN2_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
+ symbol_c * return_type_symbol = last_type_symbol;
+ function_type_suffix = return_type_symbol;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ {
+
+ {
+ symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
+ symbol_c *IN2_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN2_param_value == NULL)
+ IN2_param_value = function_call_param_iterator.next_nf();
+ if (IN2_param_value != NULL) {
+ IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+ last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
+ }
+
if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
{
@@ -14870,6 +15443,70 @@
break;
/****
+ *DIVTIME
+ */
+ case function_divtime :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN1_param_value = &this->default_variable_name;
+
+ symbol_c *IN1_type_symbol = param_data_type;
+ last_type_symbol = param_data_type;
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ {
+
+ {
+ symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
+ symbol_c *IN2_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN2_param_value == NULL)
+ IN2_param_value = function_call_param_iterator.next_nf();
+ if (IN2_param_value != NULL) {
+ IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+ last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_div"));
+
+ if (IN1_type_symbol == NULL)
+ IN1_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+
+ if (IN2_type_symbol == NULL)
+ IN2_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ if (search_expression_type->is_literal_integer_type(function_type_suffix))
+ function_type_suffix = &search_constant_type_c::lint_type_name;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_divtime*/
+ break;
+
+/****
*MOD
*/
case function_mod :
@@ -16927,46 +17564,6 @@
symbol_c *IN1_type_symbol = param_data_type;
last_type_symbol = param_data_type;
- if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
- {
-
- {
- symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
- symbol_c *IN2_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN2_param_value == NULL)
- IN2_param_value = function_call_param_iterator.next_nf();
- if (IN2_param_value != NULL) {
- IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
- last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
- }
-
- if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
- {
-
- function_name = (symbol_c*)(new pragma_c("__time_add"));
-
- if (IN1_type_symbol == NULL)
- IN1_type_symbol = last_type_symbol;
- ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
-
- if (IN2_type_symbol == NULL)
- IN2_type_symbol = last_type_symbol;
- ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- break;
-
- }
-
-
- ERROR;
- }
-
- }
-
if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
{
@@ -17046,6 +17643,68 @@
break;
/****
+ *CONCAT_DAT_TOD
+ */
+ case function_concat_dat_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN1_param_value = &this->default_variable_name;
+
+ symbol_c *IN1_type_symbol = param_data_type;
+ last_type_symbol = param_data_type;
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+ {
+
+ {
+ symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
+ symbol_c *IN2_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN2_param_value == NULL)
+ IN2_param_value = function_call_param_iterator.next_nf();
+ if (IN2_param_value != NULL) {
+ IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+ last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_add"));
+
+ if (IN1_type_symbol == NULL)
+ IN1_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+
+ if (IN2_type_symbol == NULL)
+ IN2_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_concat_dat_tod*/
+ break;
+
+/****
*INSERT
*/
case function_insert :
diff -r 050d31dd7c74 -r c0453b7f99df stage4/generate_c/st_code_gen.c
--- a/stage4/generate_c/st_code_gen.c Mon Apr 04 19:18:22 2011 +0200
+++ b/stage4/generate_c/st_code_gen.c Tue Apr 05 15:14:19 2011 +0200
@@ -1,24 +1,20 @@
/*
- * (c) 2008 Edouard TISSERANT
+ * Copyright (C) 2007-2011: Edouard TISSERANT and Laurent BESSARD
*
- * Offered to the public under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
+ * See COPYING and COPYING.LESSER files for copyright details.
*
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
- * Public License for more details.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * This code is made available on the understanding that it will not be
- * used in safety-critical situations without a full and competent review.
- */
-
-/*
- * An IEC 61131-3 IL and ST compiler.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * Based on the
- * FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10)
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*
*/
@@ -16694,6 +16690,210 @@
break;
/****
+ *ADD_TIME
+ */
+ case function_add_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
+ symbol_c *IN1_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN1_param_value == NULL)
+ IN1_param_value = function_call_param_iterator.next_nf();
+ if (IN1_param_value != NULL) {
+ IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+ last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
+ }
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ {
+
+ {
+ symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
+ symbol_c *IN2_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN2_param_value == NULL)
+ IN2_param_value = function_call_param_iterator.next_nf();
+ if (IN2_param_value != NULL) {
+ IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+ last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_add"));
+
+ if (IN1_type_symbol == NULL)
+ IN1_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+
+ if (IN2_type_symbol == NULL)
+ IN2_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_add_time*/
+ break;
+
+/****
+ *ADD_TOD_TIME
+ */
+ case function_add_tod_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
+ symbol_c *IN1_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN1_param_value == NULL)
+ IN1_param_value = function_call_param_iterator.next_nf();
+ if (IN1_param_value != NULL) {
+ IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+ last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
+ }
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+ {
+
+ {
+ symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
+ symbol_c *IN2_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN2_param_value == NULL)
+ IN2_param_value = function_call_param_iterator.next_nf();
+ if (IN2_param_value != NULL) {
+ IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+ last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_add"));
+
+ if (IN1_type_symbol == NULL)
+ IN1_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+
+ if (IN2_type_symbol == NULL)
+ IN2_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
+ symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_add_tod_time*/
+ break;
+
+/****
+ *ADD_DT_TIME
+ */
+ case function_add_dt_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
+ symbol_c *IN1_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN1_param_value == NULL)
+ IN1_param_value = function_call_param_iterator.next_nf();
+ if (IN1_param_value != NULL) {
+ IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+ last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
+ }
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+ {
+
+ {
+ symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
+ symbol_c *IN2_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN2_param_value == NULL)
+ IN2_param_value = function_call_param_iterator.next_nf();
+ if (IN2_param_value != NULL) {
+ IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+ last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_add"));
+
+ if (IN1_type_symbol == NULL)
+ IN1_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+
+ if (IN2_type_symbol == NULL)
+ IN2_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_add_dt_time*/
+ break;
+
+/****
*MUL
*/
case function_mul :
@@ -16836,6 +17036,76 @@
break;
/****
+ *MULTIME
+ */
+ case function_multime :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
+ symbol_c *IN1_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN1_param_value == NULL)
+ IN1_param_value = function_call_param_iterator.next_nf();
+ if (IN1_param_value != NULL) {
+ IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+ last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
+ }
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ {
+
+ {
+ symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
+ symbol_c *IN2_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN2_param_value == NULL)
+ IN2_param_value = function_call_param_iterator.next_nf();
+ if (IN2_param_value != NULL) {
+ IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+ last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_mul"));
+
+ if (IN1_type_symbol == NULL)
+ IN1_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+
+ if (IN2_type_symbol == NULL)
+ IN2_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ if (search_expression_type->is_literal_integer_type(function_type_suffix))
+ function_type_suffix = &search_constant_type_c::lint_type_name;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_multime*/
+ break;
+
+/****
*SUB
*/
case function_sub :
@@ -17099,6 +17369,363 @@
break;
/****
+ *SUB_TIME
+ */
+ case function_sub_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
+ symbol_c *IN1_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN1_param_value == NULL)
+ IN1_param_value = function_call_param_iterator.next_nf();
+ if (IN1_param_value != NULL) {
+ IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+ last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
+ }
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ {
+
+ {
+ symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
+ symbol_c *IN2_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN2_param_value == NULL)
+ IN2_param_value = function_call_param_iterator.next_nf();
+ if (IN2_param_value != NULL) {
+ IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+ last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_sub"));
+
+ if (IN1_type_symbol == NULL)
+ IN1_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+
+ if (IN2_type_symbol == NULL)
+ IN2_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sub_time*/
+ break;
+
+/****
+ *SUB_DATE_DATE
+ */
+ case function_sub_date_date :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
+ symbol_c *IN1_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN1_param_value == NULL)
+ IN1_param_value = function_call_param_iterator.next_nf();
+ if (IN1_param_value != NULL) {
+ IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+ last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
+ }
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+ {
+
+ {
+ symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
+ symbol_c *IN2_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN2_param_value == NULL)
+ IN2_param_value = function_call_param_iterator.next_nf();
+ if (IN2_param_value != NULL) {
+ IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+ last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_sub"));
+
+ if (IN1_type_symbol == NULL)
+ IN1_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+
+ if (IN2_type_symbol == NULL)
+ IN2_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sub_date_date*/
+ break;
+
+/****
+ *SUB_TOD_TIME
+ */
+ case function_sub_tod_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
+ symbol_c *IN1_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN1_param_value == NULL)
+ IN1_param_value = function_call_param_iterator.next_nf();
+ if (IN1_param_value != NULL) {
+ IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+ last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
+ }
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+ {
+
+ {
+ symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
+ symbol_c *IN2_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN2_param_value == NULL)
+ IN2_param_value = function_call_param_iterator.next_nf();
+ if (IN2_param_value != NULL) {
+ IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+ last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_sub"));
+
+ if (IN1_type_symbol == NULL)
+ IN1_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+
+ if (IN2_type_symbol == NULL)
+ IN2_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
+ symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sub_tod_time*/
+ break;
+
+/****
+ *SUB_TOD_TOD
+ */
+ case function_sub_tod_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
+ symbol_c *IN1_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN1_param_value == NULL)
+ IN1_param_value = function_call_param_iterator.next_nf();
+ if (IN1_param_value != NULL) {
+ IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+ last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
+ }
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+ {
+
+ {
+ symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
+ symbol_c *IN2_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN2_param_value == NULL)
+ IN2_param_value = function_call_param_iterator.next_nf();
+ if (IN2_param_value != NULL) {
+ IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+ last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_sub"));
+
+ if (IN1_type_symbol == NULL)
+ IN1_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+
+ if (IN2_type_symbol == NULL)
+ IN2_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sub_tod_tod*/
+ break;
+
+/****
+ *SUB_DT_TIME
+ */
+ case function_sub_dt_time :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
+ symbol_c *IN1_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN1_param_value == NULL)
+ IN1_param_value = function_call_param_iterator.next_nf();
+ if (IN1_param_value != NULL) {
+ IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+ last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
+ }
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+ {
+
+ {
+ symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
+ symbol_c *IN2_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN2_param_value == NULL)
+ IN2_param_value = function_call_param_iterator.next_nf();
+ if (IN2_param_value != NULL) {
+ IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+ last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_sub"));
+
+ if (IN1_type_symbol == NULL)
+ IN1_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+
+ if (IN2_type_symbol == NULL)
+ IN2_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ break;
+
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_sub"));
+
+ if (IN1_type_symbol == NULL)
+ IN1_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+
+ if (IN2_type_symbol == NULL)
+ IN2_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_sub_dt_time*/
+ break;
+
+/****
*DIV
*/
case function_div :
@@ -17210,6 +17837,76 @@
break;
/****
+ *DIVTIME
+ */
+ case function_divtime :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
+ symbol_c *IN1_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN1_param_value == NULL)
+ IN1_param_value = function_call_param_iterator.next_nf();
+ if (IN1_param_value != NULL) {
+ IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+ last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
+ }
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
+ {
+
+ {
+ symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
+ symbol_c *IN2_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN2_param_value == NULL)
+ IN2_param_value = function_call_param_iterator.next_nf();
+ if (IN2_param_value != NULL) {
+ IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+ last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_div"));
+
+ if (IN1_type_symbol == NULL)
+ IN1_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+
+ if (IN2_type_symbol == NULL)
+ IN2_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
+ symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
+ if (search_expression_type->is_literal_integer_type(function_type_suffix))
+ function_type_suffix = &search_constant_type_c::lint_type_name;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_divtime*/
+ break;
+
+/****
*MOD
*/
case function_mod :
@@ -19429,46 +20126,6 @@
last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
}
- if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
- {
-
- {
- symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
- symbol_c *IN2_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN2_param_value == NULL)
- IN2_param_value = function_call_param_iterator.next_nf();
- if (IN2_param_value != NULL) {
- IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
- last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
- }
-
- if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
- {
-
- function_name = (symbol_c*)(new pragma_c("__time_add"));
-
- if (IN1_type_symbol == NULL)
- IN1_type_symbol = last_type_symbol;
- ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
-
- if (IN2_type_symbol == NULL)
- IN2_type_symbol = last_type_symbol;
- ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- break;
-
- }
-
-
- ERROR;
- }
-
- }
-
if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
{
@@ -19548,6 +20205,74 @@
break;
/****
+ *CONCAT_DAT_TOD
+ */
+ case function_concat_dat_tod :
+ {
+ symbol_c *last_type_symbol = NULL;
+
+ {
+ symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
+ symbol_c *IN1_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN1_param_value == NULL)
+ IN1_param_value = function_call_param_iterator.next_nf();
+ if (IN1_param_value != NULL) {
+ IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
+ last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
+ }
+
+ if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
+ {
+
+ {
+ symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
+ /* Get the value from a foo( = ) style call */
+ symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
+ symbol_c *IN2_type_symbol = NULL;
+
+ /* Get the value from a foo() style call */
+ if (IN2_param_value == NULL)
+ IN2_param_value = function_call_param_iterator.next_nf();
+ if (IN2_param_value != NULL) {
+ IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
+ last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
+ }
+
+ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
+ {
+
+ function_name = (symbol_c*)(new pragma_c("__time_add"));
+
+ if (IN1_type_symbol == NULL)
+ IN1_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN1_param_name, IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in)
+
+ if (IN2_type_symbol == NULL)
+ IN2_type_symbol = last_type_symbol;
+ ADD_PARAM_LIST(IN2_param_name, IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in)
+ symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
+ break;
+
+ }
+
+
+ ERROR;
+ }
+
+ }
+
+
+ ERROR;
+ }
+
+ }/*function_concat_dat_tod*/
+ break;
+
+/****
*INSERT
*/
case function_insert :
diff -r 050d31dd7c74 -r c0453b7f99df stage4/generate_iec/Makefile
--- a/stage4/generate_iec/Makefile Mon Apr 04 19:18:22 2011 +0200
+++ b/stage4/generate_iec/Makefile Tue Apr 05 15:14:19 2011 +0200
@@ -1,3 +1,21 @@
+# matiec - a compiler for the programming languages defined in IEC 61131-3
+#
+# Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt)
+# Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see