2014-12-26 mjsousa Add checks for use of non constant value in subranges, and lower_limit > upper_limit.
2014-12-26 mjsousa Fix previous commit (symtable operator[] must return a reference to the stored value!)
2014-12-26 mjsousa Do constant propagation of configuration/resource variables, taking into account scope of variables.
2014-12-26 mjsousa Change dsymbtable_c -> use design pattern used by C++ standard library (STL)
2014-12-26 mjsousa Change symbtable_c -> use design pattern used by C++ standard library (STL)
2014-12-26 mjsousa Remove debugging code left in by mistake.
2014-12-26 mjsousa Do constant propagation inside Configurations and Resources (required for support of extension: array [1..max] OF int); (Resources is still buggy)
2014-12-25 mjsousa Do constant folding of default initial values of datatypes.
2014-12-24 mjsousa Do constant propagation to symbolic_variables, and correctly handle constant folding and propagation of variable declarations.
2014-12-17 mjsousa When generating C code, use the const_value of a symbolic_variable when it is used in a subrange.
2014-12-17 mjsousa Small code re-organization of how const values are stored in symbol_c (can now be accessed through member functions, instead of macros)
2014-12-14 mjsousa Fix bugs introduced in previous commit (once again do constant folding of all literals in type declarations)
2014-12-14 mjsousa Do constant folding of variable's initial value (allows correct C code generation with variables in the subrange of an array declaration: ARRAY [1..max] of INT).
2014-12-10 mjsousa Delete un-used declaration.
2014-12-10 mjsousa merge
2014-11-22 mjsousa Allow variables to be used when declaring the dimension of an array.
2014-12-06 mjsousa Fix C code generation when forward references (-p command line option) is on.
2014-12-06 mjsousa Add a new pou_typename_c object to the AST to store references to previously declared Functions, FB, and Programs.
2014-11-30 mjsousa Delete unused file.
2014-11-30 mjsousa Make use of pre-parser a command line option.
2014-11-30 mjsousa Fix AST generated by parsing with preparsing switched OFF (typo in array datatypes, and fix parsing of POUs).
2014-11-29 mjsousa Fix AST generated by parsing with preparsing switched on, and allow parsing to work with preparsing off.
2014-11-29 mjsousa Fix bug introduced when adding support for relaxed datatype model: change derived_datatype_identifier_c to identifier_c when used as an identifier
2014-11-29 mjsousa Add a pre-parsing phase to stage1_2 (allows source code that references POUs and datatypes before they are declared)
2014-11-29 mjsousa Comment out unused and buggy code.
2014-11-27 mjsousa Update the comments in source code.
2014-11-26 mjsousa Fix bug introduced when adding support for relaxed datatype model. Code cleanup.
2014-11-23 mjsousa Fix main state machine in flex (states were being pushed without being poped from the stack)
2014-11-16 mjsousa merge
2014-11-16 mjsousa Make the relaxed datatype model a runtime option (off by default)
2014-11-16 mjsousa Add support for relaxed datatype model for array datatypes.
2014-11-09 mjsousa fix bug introduced a few commits ago: do not print the first char ('%') of a direct_variable_c (e.g. skip % in %IW4.2)
2014-10-25 mjsousa fix code generation when dereferencing pointers (ref_to) to arrays (ref_to_array^[5])
2014-10-25 mjsousa Fix bug: set the scope annotation in deref_operators used inside structs
2014-10-25 mjsousa Editing of error message to make it more clear.
2014-10-25 mjsousa Filling of symbol->scope annotation moved from narrow to fill_candidate_datatypes_c (became possible because narrowing of struct, array and symbolic variables is now done directly in fill_candidate_datatypes_c)
2014-10-25 mjsousa fill_candidate_datatypes_c now uses search_varinstance_decl_c instead of search_varfb_instance_type_c (moving towards deprecation of search_varfb_instance_type_c)
2014-10-19 mjsousa Do the full fill_candidate/narrow_datatype algorithm for all fields of a structured variable in the fill_candidate_datatypes_c
2014-10-19 mjsousa Fix bug with multple dereferencing (bool_var := bool_ptr_ptr^^;)
2014-10-19 mjsousa Fix bug: Add support for de-referencing pointers to struct (struct_ptr^.elem1) when used inside FB.
2014-09-28 mjsousa Fix bug: add support for dereferencing of REF_TO to REF_TO xxx (e.g.: bool_var := ref_to_ref_to_bool^^;)
2014-09-28 mjsousa Turn support of derefencing operator '^' an option (default is not supported).
2014-09-28 mjsousa Add support for de-referencing of REF_TO datatypes (Note: dereferencing of arrays and structs not yet supported!)
2014-09-27 mjsousa Add support for REF_TO inside arrays and structs (a non-standard feature!)
2014-08-11 mjsousa Code cleanup: with the introduction of anotation_map[], generate_c_vardecl_c can now derive directly from generate_c_base_c
2014-08-11 mjsousa Fix typos in comments
2014-08-11 mjsousa Add comments, and make get_datatype_id_str_c equivalent to get_datatype_id_c
2014-08-11 mjsousa Fix calling of functions whose parameters are of an implicitly declared datatype (currently only makes sense for REF_TO datatypes, but may make sense to other datatypes too if the datatype model is changed in the future).
2014-08-10 mjsousa fix indentations.
2014-08-10 mjsousa in lvalue, add check for REF() fucntion invocation, and the NULL literal
2014-08-09 mjsousa Initialise REF_TO variables to NULL.
2014-08-09 mjsousa Make support for REF_TO ANY a command line option.
2014-08-09 mjsousa Add support for non standard REF_TO ANY (equivalent to void *)
2014-08-08 mjsousa Update some comments. (No changes to code)
2014-08-08 mjsousa Introduce absyntax class for keyword ANY, and use REF_TO(ANY) as datatype of NULL literal.
2014-08-06 mjsousa Fix bug (introduced a few commits ago) when generating SFC actions that are mapped onto variables --> Make generate_sfcdecl_c stateless (i.e. does not depend on order by which it is called).
2014-07-31 mjsousa Add support for the 'NULL' keyword, defined in version 3 of IEC 61131-3.
2014-07-29 mjsousa for option '-Op' (generate <pouname>.h/c): add '#include <pouname>.h' to the .c file, and '#ifdef <pouname>_H' to the .h file
2014-07-25 mjsousa Ass include of iec_std_lib.h in POUS.h file.
2014-07-21 mjsousa Add support for implicitly declared REF_TO datatypes.
2014-07-20 mjsousa With -Op option --> Place implicitly defined datatypes in the .h file corresponding to the POU where they are used.
2014-07-20 mjsousa Add name of POU as prefix to names of implicitly defined datatypes
2014-07-20 mjsousa Implicitly defined array datatypes use new naming method (greatly simplifies stage 4 code).
2014-07-20 mjsousa array_specification_c may be used as a datatype! Add it to spec_init_separator_c
2014-07-13 mjsousa Change REF() operator to return the correct REF_TO datatype datatype.
2014-07-13 mjsousa Narrow array subscripts correctly, even in the presence of other datatype errors (so we do not generate error messages for array subscripts that do not contain errors).
2014-07-13 mjsousa Add support for REF_TO derived datatypes (along with datatype verification)
2014-07-06 mjsousa Add option to place each POU in a distinct .c and .h file pair.
2014-07-06 mjsousa code re-organisation. Preparing for the changes to come in the next commit (one C file for each POU)
2014-07-06 mjsousa Remove un-used parameter from class constructor.
2014-07-06 mjsousa Move standard FBs to a pre-converted C file, insted of converting them every time along with the IEC source.
2014-07-06 mjsousa Move library files compiled to C to their own subdiectory.
2014-07-06 mjsousa Fix stupid mistake in previous commit (use 'long double' instead of 'ld' in istandard library macro)
2014-07-05 mjsousa merge
2014-07-05 mjsousa Update build/compile instructions to reflect the fact that autoconf needs to be executed.
2014-07-05 mjsousa Fix time conversion function in std library, and change into macro (so it may be used in variable initialisations)
2014-06-01 mjsousa Add support for the stepname.T syntax.
2014-06-01 mjsousa Change the name of the variable with the step state to stepname.X (in the generated VARIABLES.csv file)
2014-05-31 mjsousa Add support for Stepname.X syntax.
2014-05-31 mjsousa Remove dead code previously left in by mistake.
2014-05-29 mjsousa Add error message for invalid datatype of transition condition. Generalize datatype narrowing algorithm for transition conditions.
2014-05-28 Edouard Tisserant merge
2014-05-28 Edouard Tisserant closed temporary fix branch
2014-05-20 mjsousa Check VAR_EXTERN variables declared in FBs instantiated in a Program (and recursively too - FBs in FBs).
2014-05-20 mjsousa Fix typo in as yet dormant code (related to REF_TO keyword, that is not yet active)
2014-05-08 mjsousa Fix compilation error on platforms where real64_t is mapped onto 'long double'
2014-04-08 mjsousa Correctly handle structured variables that include FB and external FBs (example: FB1.FB2.extFB3.FB4.extFB5.extFB6.structvar.field1 := 42;) (this commit fixes only ST code. TODO: IL and SFC)
2014-04-04 mjsousa Remove call to type_is_complex() in ST code generation.
2014-03-31 mjsousa A little code cleanup (reduce number of possible variable generation states)
2014-03-30 mjsousa Finish: Change order of SET_xxx() macros. (this will allow me to simplify the print_setter() methods later on)
2014-03-29 mjsousa Change order of SET_xxx() macros. (this will allow me to simplify the print_setter() methods later on)
2014-03-27 Edouard Tisserant More static declarations in POUS.c in order to avoid conflicting symbol definitions with new POUS.c inclusion scheme
2014-03-26 Edouard Tisserant Fix multiple resources support, POUS.c now only contain static definitions. POUS.c is included in configuration C code as well as in resources to allow GLOBAL FBs to be declared in configurations
2014-03-20 Edouard Tisserant Disable stage4 options with on windows since getsuboptr isn't supported in mingw
2014-03-20 Edouard Tisserant merge
2014-03-19 mjsousa Track of line number correctly when input file has code with very long lines.
2014-03-19 mjsousa Fix memory leak in lexical parser.
2014-03-16 mjsousa Make generation of #line directives optional.
2014-03-16 mjsousa Insert #line directives in generated C code.
2014-03-15 mjsousa Add support for parsing of REF_TO keyword (defined in IEC61131-3 v3). This support is currently inactive (in flex) until we get to add C code generation later on.
2014-03-15 mjsousa Update files to be ignored by mercurial: ignore files generated by autoconf, directory test/, and *.orig
2014-03-02 mjsousa Fix bug: do not print IL 'label' when generating inline functions (JMPxx label was generating erroneous C code)
2014-03-02 mjsousa Add limited support for the REF() operator (defined in v3 of IEC 61131-3)
2014-02-24 mjsousa Remove assertion being failed by IL labels (IL labels do not yet have specific datatypes).
2014-02-28 Edouard Tisserant Added stage1_2/Makefile.am weird rule to keep compatible with previous version of automake
2014-02-19 Edouard Tisserant Merge
2014-02-16 mjsousa fix definition of pragma.
2014-02-16 mjsousa Fix the state machine that became broken 2 commits ago (when adding support for nested comments)
2014-02-16 mjsousa Add option to control support for nested comments (default is off, as defined in IEC 61131-3 v2)
2014-02-15 mjsousa Add support for nested comments
2014-02-12 mjsousa Fix bug: when checking compatibility between GLOBAL and EXTERNAL variables, must only enforce GLOBAL CONSTANT => EXTERNAL CONSTANT.
2014-02-11 mjsousa merge
2014-01-06 Mario de Sousa Fix bug: correctly generate code when accessing external variables declared inside FBs as a structured variable (realvar := fb1.fb2.extvar1.realvar)
2014-02-09 mjsousa Fix bug in standard: standard does not allow multiple VAR_GLOBAL ... END_VAR constructs in configurations and resources. This is probably a bug, so we allow it.
2014-02-09 mjsousa Code cleanup (part 3): generate_c_typedecl_c is no longer needed for code generation in POUS.c It is now only needed for datatype declaration in POUS.h
2014-02-08 mjsousa Code cleanup (part 2): generate_typedecl_c now only prints to POUS.h !
2014-02-08 mjsousa Code cleanup (part 1): subrange check functions are now declared in POUS.h (as static inline functions or #define)
2014-02-08 mjsousa Fix get_datatype_info_c::is_subrange(), which did not work when using base type! (we now use get_equivtype() instead of get_base_type() )
2014-02-08 mjsousa fix a couple of typos.
2014-02-08 mjsousa Fix bug - correctly declare struct members whose type is a directly defined array (e.g.: STRUCT x: ARRAY of XXX; END_STRUCT)
2014-02-05 mjsousa Start using the called_fb_declaration annotation when generating C code from FB calls in ST.
2013-12-22 Mario de Sousa Code cleanup: move datatype analysis to get_datatype_info_c
2013-12-20 Mario de Sousa Fix bug-fix of previous commit.
2013-12-19 Mario de Sousa Fix bug: allow use, as lvalues, structures/arrays inside FBs (e.g. fb1.struct1.r := 33.3).
2013-12-18 Mario de Sousa Fix bug/issue #33 (correctly access struct/array variables declared inside a FB -> r:=FB1.FB2.struct1.array1[3] )
2013-09-07 Mario de Sousa Add assertion suggested by Manuele.
2013-08-23 mjsousa merge
2013-08-23 mjsousa Use get_datatype_info_c::is_type_valid() to determine datatype validity
2013-08-23 mjsousa Recursively check the datatype compatibility of values/expressions passed in function/FB invocations.
2013-08-23 mjs Change error message text so as to become more suitable to where they might occur in the source code.
2013-08-22 mjsousa Add code to check if an IN_OUT variable is being passed an IL list in formal IL FB/function invocations.
2013-08-22 mjsousa Generate correct error message when encountering IL lists embedded in IL formal invocations.
2013-08-22 mjsousa Fill in the 'datatype' anotation in the identifiers of symbolic variables.
2013-08-22 mjsousa Fix C code generation of FB invocation in IL.
2013-08-22 mjsousa Fix detection of datatype errors on IL conditional flow control operators (JMPC, RETC, ...)
2013-08-21 mjsousa Allow array_dimension_iterator to accept an array_spec_init_c.
2013-08-21 mjsousa Small code cleanup (move common code to a function)
2013-08-21 mjsousa Fix datatype analysis of conditional IL operators (CALC, CALCN, RETC, RETCN, JMPC, JMPCN, S and R)
2013-08-21 mjsousa Fix datatype analyses of S and R IL operators.
2013-08-21 mjsousa make sure all IL operands are narrowed (datatype checking algorithm)
2013-08-21 mjsousa cosmetic change only - fix code alignment.
2013-08-20 mjsousa Add support for FB call semantics of 'S' and 'R' IL operators!
2013-08-20 mjsousa Stop lvalue check from segfaulting when coming across buggy IL code (IL operator with no operand!)
2013-08-20 mjsousa Allow get_datatype_info_c to be called with NULL parameters.
2013-08-15 mjsousa Do lvalue check of function output parameters (since they may contain expressions inside array subscripts!)
2013-08-10 mjsousa Handle buggy source code gracefully (do not bork when non-array variable is used as an array. e.g: int_var[42]:= 33)
2013-08-07 mjsousa Delete debugging messages left in by mistake.
2013-08-07 mjsousa Fix segfault when doing lvalue check of buggy IEC 61131-3 source code
2013-08-07 mjsousa Fix datatype analysis of structured variables that contain arrays in their fields (e.g. var.x1[var2 + 42].y1).
2013-08-05 mjsousa Add capability of returning array subscript list while decomposing a struct/array variable.
2013-08-05 mjsousa Code cleanup: Remove unused option = Delete dead code.
2013-08-20 mjsousa merge
2013-07-19 Mario de Sousa Declare that YYLSTYPE is not the default trivial datatype used by bison. (was causing compile errors in bison ver >= 2.7)
2014-02-19 Edouard Tisserant Fix build on Ubuntu 13.10
2013-10-11 Laurent Bessard Fixed warning when compiling generated program containing external variable assignments
2013-06-07 Edouard Tisserant Enlarged flex buffer size in order to accept larger C pragmas
2013-05-18 edouard Missing braces arround extern declarartions in __SET_EXTERNAL define was making problem with GCC in switch case statements
2013-05-16 Edouard Tisserant Moved __INIT_* defines within type definition headers files
2013-05-02 Laurent Bessard Fixed warning in accessor __SET_EXTERNAL
2013-04-18 Laurent Bessard Fixed bug when defining task with single_data_source instead of interval_data_source
2013-04-05 Edouard Tisserant Merged Mario's changes
2013-04-04 Mario de Sousa Fix bug related to FB invocation of FB instances declared as VAR_EXTERN.
2013-04-04 Edouard Tisserant Merged Mario's changes
2013-04-03 Mario de Sousa Partial fix to VAR_EXTERN vs VAR_GLOBAL check. Now considers globals declared in resources too. TODO: recursively check FB declared in the program.
2013-02-22 Mario de Sousa Allow variables declared inside resources to be referenced by res_name.var_name
2013-02-13 Mario de Sousa Add a new node to the abstract symtax tree, which will let us do datatype checking of FB variable declarations using the standard algorithm, and no special cases.
2013-02-05 Mario de Sousa Print filename when debugging abstract symbol table.
2013-01-23 Mario de Sousa Consider fb_name_decl_c a non base data type class!
2013-01-23 Mario de Sousa Fill symbol->datatype anotation for FB declarations.
2013-01-23 Mario de Sousa Fill in the symbol.datatype annotation in symbol classes used in derived data type declarations.
2013-01-22 Mario de Sousa Use simple_spec_init_c inside en_param_declaration_c (will reduce need to handle it as a special case in the future).
2013-03-11 Laurent Bessard Merged
2013-03-11 Laurent Bessard Fixed bug in string format when translating TIME and DATETIME to STRING
2013-03-11 Laurent Bessard Fixed bug with SFC transition datatype checking
2013-03-08 Edouard Tisserant Stripped generated files again. http://stackoverflow.com/questions/3290908/which-files-generated-by-autotools-should-i-keep-in-version-control-repository
2013-03-08 Laurent Bessard Fixed bug in case statement with enumerated type variable as case expression
2013-03-08 Laurent Bessard Merged
2013-01-13 Mario de Sousa Set the symbol->datatpe of function_declaration_c
2013-01-13 Mario de Sousa Fill in the symbol->datatype of elementary datatypes.
2013-01-10 Mario de Sousa merge
2013-01-03 Mario de Sousa merge
2013-01-03 Mario de Sousa Fix divide by 0 bug.
2013-01-03 Mario de Sousa grand merge
2013-01-10 Mario de Sousa disable not yet complete constant propagation algorithm (currently brocken and producing incorrect results),
2013-01-10 Mario de Sousa merge
2013-01-03 Manuele Conti Fix constant propagation for repeat_statement_c class.
2013-01-03 Manuele Conti Remove unused variable.
2013-01-03 Manuele Conti Implement Mario's suggestions:
2013-01-03 Manuele Conti Fix constant_folding missing call. [Bug found by Mario.]
2013-01-03 Mario de Sousa Fix divide by 0 bug.
2013-01-03 Mario de Sousa merge
2013-01-03 Manuele Conti Fix CPPFLAGS Makefile.am for all stage4.
2012-12-31 Manuele Conti Remove redundant class for get variable name.
2012-12-28 Manuele Conti Fix constant propagation alg. in for statement like Mario suggestion.
2012-12-28 Manuele Conti Add note about How Constant Folding class is extended with a implementation constant propagation algorithm
2012-12-26 Manuele Conti Add constant propagation algorithm for loop cycles.
2012-12-28 Mario de Sousa Update symbol_c::first_file/last_file entries in list_c::add_element()
2012-12-27 Mario de Sousa moved class to obtain datatype name (in char *) to get_datatype_info_c
2012-12-27 Mario de Sousa merge
2012-12-24 Manuele Conti Fix comment about meet semilattice rules.
2012-12-22 Manuele Conti Complete fix initialize const_value.
2012-12-22 Manuele Conti Start to implement constant propagation algorithm.
2012-12-22 Manuele Conti Fix const_value field initialized.
2012-12-02 Manuele Conti Remove Ambiguous enumerate value in enum conversion functions.
2012-12-02 Manuele Conti Fix enum conversion function to string.
2012-11-28 Manuele Conti Fix struct generic_function_call_t initialize style.
2012-11-27 Manuele Conti Merge with Mario's changes.
2012-12-20 Manuele Conti Merge with Mario's repository.
2012-12-20 Manuele Conti Fix warning about call fprintf without format string.
2012-12-03 Mario de Sousa merge
2012-12-02 Manuele Conti Remove Ambiguous enumerate value in enum conversion functions.
2012-12-02 Manuele Conti Fix enum conversion function to string.
2012-11-28 Manuele Conti Fix struct generic_function_call_t initialize style.
2012-12-03 Mario de Sousa Small code cleanup.
2012-12-01 mjsousa Allow bison to ask for an END_OF_INPUT token multiple times!
2012-12-01 mjsousa Protect against redefining macros
2012-11-27 Mario de Sousa merge
2012-11-27 Manuele Conti Fix flag to enable conversion functions.
2012-11-27 Mario de Sousa Code cleanup: move tracking functions to flex.
2012-11-27 Mario de Sousa Insert the auto generated enum datatype conversion functions after the TYPE...END_TYPE, instead of at the end of input file.
2012-11-26 Mario de Sousa merge
2012-11-23 Manuele Conti Set ENO to false when conversion function fails.
2012-11-23 Manuele Conti Fix typo in functionDataType array.
2012-11-23 Mario de Sousa Add files missing from a few commits ago...
2012-11-22 Mario de Sousa merge
2012-11-20 Manuele Conti Refix automake files.
2012-11-20 Manuele Conti Add some comments to argument new code.
2012-11-19 Manuele Conti Start to change code like Mario suggestions.
2012-11-19 Manuele Conti Create functionDataType array in derived_conversion_functions_c.
2012-11-16 Manuele Conti Add conversion functions option.
2012-11-15 Manuele Conti Start enumerate conversion functions.
2012-11-22 Mario de Sousa merge
2012-11-12 Manuele Conti Be sure to not redefine TRUE and FALSE macros.
2012-11-22 Mario de Sousa merge
2012-11-12 Manuele Conti Removed unused __attribute__((__packed__)) only gcc compatible.
2012-11-12 Manuele Conti Protect IEC_STD_LIB.H header agaist multi-include problems.
2012-11-22 Mario de Sousa merge
2012-11-22 Mario de Sousa Start to move enumeration declaration checking to its own class.
2012-11-22 Mario de Sousa Fix comments and code alignment
2012-11-19 Mario de Sousa Fix warnings previous change introduced when compiling with gcc.