--- a/generate_IEC_std.py Wed Jan 30 18:48:49 2008 +0100
+++ b/generate_IEC_std.py Fri Feb 08 14:37:48 2008 +0100
@@ -45,7 +45,7 @@
#pp = pprint.PrettyPrinter(indent=4)
matiec_header = """/*
- * (c) 2003 Mario de Sousa
+ * (c) 2008 Edouard TISSERANT
*
* 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
@@ -67,11 +67,16 @@
* FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10)
*
*/
+
+/****
+ * IEC 61131-3 standard function library
+ * generated code, do not edit by hand
+ */
"""
matiec_lesser_header = """/*
- * (c) 2003 Mario de Sousa
+ * (c) 2008 Edouard TISSERANT
*
* Offered to the public under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either version 2
@@ -86,14 +91,11 @@
* 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)
- *
- */
-
+/****
+ * IEC 61131-3 standard function library
+ * generated code, do not edit by hand
+ */
+
"""
def ANY_to_compiler_test_type_GEN(typename, paramname):
@@ -278,10 +280,6 @@
Generate the long enumeration of std function types
"""
function_type_decl = matiec_header + """
-/****
- * IEC 61131-3 standard function lib
- * generated code, do not edit by hand
- */
typedef enum {
"""
for fname, fdecls in [ (fname,std_fdecls[fname]) for fname in official_order ]:
@@ -295,10 +293,6 @@
Generate the funct that return enumerated according function name
"""
get_function_type_decl = matiec_header + """
-/****
- * IEC 61131-3 standard function lib
- * generated code, do not edit by hand
- */
function_type_t get_function_type(identifier_c *function_name) {
"""
for fname, fdecls in [ (fname,std_fdecls[fname]) for fname in official_order ]:
@@ -318,10 +312,6 @@
that is responsible to generate C code for std lib calls.
"""
st_code_gen = matiec_header + """
-/****
- * IEC 61131-3 standard function lib
- * generated code, do not edit by hand
- */
switch(current_function_type){
"""
@@ -355,10 +345,6 @@
that is responsible to generate C code for std lib calls.
"""
il_code_gen = matiec_header + """
-/****
- * IEC 61131-3 standard function lib
- * generated code, do not edit by hand
- */
switch(current_function_type){
"""
@@ -392,10 +378,6 @@
that is responsible of returning type symbol for function invocation.
"""
search_type_code = matiec_header + """
-/****
- * IEC 61131-3 standard function lib
- * generated code, do not edit by hand
- */
void *compute_standard_function_st(function_invocation_c *symbol) {
@@ -471,11 +453,6 @@
Generate the standard_function_names[] for inclusion in bizon generated code
"""
standard_function_names = matiec_header + """
-/****
- * IEC 61131-3 standard function lib
- * generated code, do not edit by hand
- */
-
const char *standard_function_names[] = {
"""
for fname, fdecls in [ (fname,std_fdecls[fname]) for fname in official_order ]:
@@ -494,10 +471,6 @@
Generate the C implementation of the IEC standard function library.
"""
iec_std_lib_generated = matiec_lesser_header + """
-/****
- * IEC 61131-3 standard function lib
- * generated code, do not edit by hand
- */
/* Macro that expand to subtypes */
"""