stage3/narrow_candidate_datatypes.hh
author mjsousa
Sat, 07 May 2016 21:17:49 +0100
changeset 1010 242907849850
parent 996 c752b113237b
child 1028 7c8709ce6b8f
permissions -rwxr-xr-x
Correctly identify errors when parsing erroneous code (make sure flex goes back to INITIAL state when code contains errors that do not allow determining whether ST or IL is being parsed)
417
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
     1
/*
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
     2
 *  matiec - a compiler for the programming languages defined in IEC 61131-3
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
     3
 *
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
     4
 *  Copyright (C) 2009-2012  Mario de Sousa (msousa@fe.up.pt)
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
     5
 *  Copyright (C) 2012       Manuele Conti (manuele.conti@sirius-es.it)
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
     6
 *  Copyright (C) 2012       Matteo Facchinetti (matteo.facchinetti@sirius-es.it)
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
     7
 *
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
     8
 *
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
     9
 *  This program is free software: you can redistribute it and/or modify
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    10
 *  it under the terms of the GNU General Public License as published by
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    11
 *  the Free Software Foundation, either version 3 of the License, or
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    12
 *  (at your option) any later version.
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    13
 *
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    14
 *  This program is distributed in the hope that it will be useful,
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    15
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    16
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    17
 *  GNU General Public License for more details.
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    18
 *
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    19
 *  You should have received a copy of the GNU General Public License
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    20
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    21
 *
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    22
 *
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    23
 * This code is made available on the understanding that it will not be
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    24
 * used in safety-critical situations without a full and competent review.
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    25
 */
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    26
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    27
/*
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    28
 * An IEC 61131-3 compiler.
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    29
 *
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    30
 * Based on the
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    31
 * FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10)
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    32
 *
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    33
 */
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    34
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    35
552
3c39d80fdede Add high level comments.
mjsousa <msousa@fe.up.pt>
parents: 502
diff changeset
    36
/* NOTE: The algorithm implemented here assumes that candidate datatype lists have already been filled!
3c39d80fdede Add high level comments.
mjsousa <msousa@fe.up.pt>
parents: 502
diff changeset
    37
 *       BEFORE running this visitor, be sure to CALL the fill_candidate_datatype_c visitor!
3c39d80fdede Add high level comments.
mjsousa <msousa@fe.up.pt>
parents: 502
diff changeset
    38
 */
3c39d80fdede Add high level comments.
mjsousa <msousa@fe.up.pt>
parents: 502
diff changeset
    39
3c39d80fdede Add high level comments.
mjsousa <msousa@fe.up.pt>
parents: 502
diff changeset
    40
3c39d80fdede Add high level comments.
mjsousa <msousa@fe.up.pt>
parents: 502
diff changeset
    41
/*
3c39d80fdede Add high level comments.
mjsousa <msousa@fe.up.pt>
parents: 502
diff changeset
    42
 *  Choose, from the list of all the possible datatypes each expression may take, the single datatype that it will in fact take.
3c39d80fdede Add high level comments.
mjsousa <msousa@fe.up.pt>
parents: 502
diff changeset
    43
 *  The resulting (chosen) datatype, will be stored in the symbol_c.datatype variable, leaving the candidate datatype list untouched!
3c39d80fdede Add high level comments.
mjsousa <msousa@fe.up.pt>
parents: 502
diff changeset
    44
 * 
3c39d80fdede Add high level comments.
mjsousa <msousa@fe.up.pt>
parents: 502
diff changeset
    45
 *  For rvalue expressions, this decision will be based on the datatype of the lvalue expression.
3c39d80fdede Add high level comments.
mjsousa <msousa@fe.up.pt>
parents: 502
diff changeset
    46
 *  For lvalue expressions, the candidate datatype list should have a single entry.
3c39d80fdede Add high level comments.
mjsousa <msousa@fe.up.pt>
parents: 502
diff changeset
    47
 * 
3c39d80fdede Add high level comments.
mjsousa <msousa@fe.up.pt>
parents: 502
diff changeset
    48
 *  For example, the very simple literal '0' in 'foo := 0', may represent a:
3c39d80fdede Add high level comments.
mjsousa <msousa@fe.up.pt>
parents: 502
diff changeset
    49
 *    BOOL, BYTE, WORD, DWORD, LWORD, USINT, SINT, UINT, INT, UDINT, DINT, ULINT, LINT (as well as the SAFE versions of these data tyes too!)
3c39d80fdede Add high level comments.
mjsousa <msousa@fe.up.pt>
parents: 502
diff changeset
    50
 * 
3c39d80fdede Add high level comments.
mjsousa <msousa@fe.up.pt>
parents: 502
diff changeset
    51
 *  In this class, the datatype of '0' will be set to the same datatype as the 'foo' variable.
3c39d80fdede Add high level comments.
mjsousa <msousa@fe.up.pt>
parents: 502
diff changeset
    52
 *  If the intersection of the candidate datatype lists of the left and right side expressions is empty, 
3c39d80fdede Add high level comments.
mjsousa <msousa@fe.up.pt>
parents: 502
diff changeset
    53
 *  then a datatype error has been found, and the datatype is either left at NULL, or set to a pointer of an invalid_type_name_c object!
3c39d80fdede Add high level comments.
mjsousa <msousa@fe.up.pt>
parents: 502
diff changeset
    54
 */
3c39d80fdede Add high level comments.
mjsousa <msousa@fe.up.pt>
parents: 502
diff changeset
    55
673
90d7636e3c39 Delete unused variables.
Mario de Sousa <msousa@fe.up.pt>
parents: 652
diff changeset
    56
#ifndef _NARROW_CANDIDATE_DATATYPES_HH
90d7636e3c39 Delete unused variables.
Mario de Sousa <msousa@fe.up.pt>
parents: 652
diff changeset
    57
#define _NARROW_CANDIDATE_DATATYPES_HH
90d7636e3c39 Delete unused variables.
Mario de Sousa <msousa@fe.up.pt>
parents: 652
diff changeset
    58
90d7636e3c39 Delete unused variables.
Mario de Sousa <msousa@fe.up.pt>
parents: 652
diff changeset
    59
552
3c39d80fdede Add high level comments.
mjsousa <msousa@fe.up.pt>
parents: 502
diff changeset
    60
417
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    61
#include "../absyntax_utils/absyntax_utils.hh"
438
744b125d911e Add support for semantic verification of function calls in IL.
Mario de Sousa <msousa@fe.up.pt>
parents: 423
diff changeset
    62
#include "datatype_functions.hh"
417
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    63
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    64
class narrow_candidate_datatypes_c: public iterator_visitor_c {
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    65
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    66
  private:
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    67
    search_varfb_instance_type_c *search_varfb_instance_type;
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    68
    symbol_c *il_operand;
459
01f6664bf8c5 Continue adding support for semantic verification of JMP and RET.
Mario de Sousa <msousa@fe.up.pt>
parents: 456
diff changeset
    69
    il_instruction_c *fake_prev_il_instruction;
674
b221168a36f1 Set datatype of il_intruction_c objects containing an ST operator.
Mario de Sousa <msousa@fe.up.pt>
parents: 673
diff changeset
    70
    il_instruction_c   *current_il_instruction;
417
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    71
480
8a58d7b8b26c Add MOD widening table, and some code clean-ups.
Mario de Sousa <msousa@fe.up.pt>
parents: 478
diff changeset
    72
    bool is_widening_compatible(const struct widen_entry widen_table[], symbol_c *left_type, symbol_c *right_type, symbol_c *result_type, bool *deprecated_status = NULL);
417
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    73
838
13ea7c080018 Fix datatype analysis of conditional IL operators (CALC, CALCN, RETC, RETCN, JMPC, JMPCN, S and R)
mjsousa
parents: 836
diff changeset
    74
    void *narrow_spec_init           (symbol_c *symbol, symbol_c *type_decl, symbol_c *init_value);
13ea7c080018 Fix datatype analysis of conditional IL operators (CALC, CALCN, RETC, RETCN, JMPC, JMPCN, S and R)
mjsousa
parents: 836
diff changeset
    75
    void *narrow_type_decl           (symbol_c *symbol, symbol_c *type_name, symbol_c *spec_init);
13ea7c080018 Fix datatype analysis of conditional IL operators (CALC, CALCN, RETC, RETCN, JMPC, JMPCN, S and R)
mjsousa
parents: 836
diff changeset
    76
    void  narrow_function_invocation (symbol_c *f_call, generic_function_call_t fcall_data);
13ea7c080018 Fix datatype analysis of conditional IL operators (CALC, CALCN, RETC, RETCN, JMPC, JMPCN, S and R)
mjsousa
parents: 836
diff changeset
    77
    void  narrow_nonformal_call      (symbol_c *f_call, symbol_c *f_decl, int *ext_parm_count = NULL);
13ea7c080018 Fix datatype analysis of conditional IL operators (CALC, CALCN, RETC, RETCN, JMPC, JMPCN, S and R)
mjsousa
parents: 836
diff changeset
    78
    void  narrow_formal_call         (symbol_c *f_call, symbol_c *f_decl, int *ext_parm_count = NULL);
13ea7c080018 Fix datatype analysis of conditional IL operators (CALC, CALCN, RETC, RETCN, JMPC, JMPCN, S and R)
mjsousa
parents: 836
diff changeset
    79
    void *narrow_implicit_il_fb_call (symbol_c *symbol, const char *param_name, symbol_c *&called_fb_declaration);
13ea7c080018 Fix datatype analysis of conditional IL operators (CALC, CALCN, RETC, RETCN, JMPC, JMPCN, S and R)
mjsousa
parents: 836
diff changeset
    80
    void *narrow_S_and_R_operator    (symbol_c *symbol, const char *param_name, symbol_c * called_fb_declaration);
839
99d9ef4d210b Small code cleanup (move common code to a function)
mjsousa
parents: 838
diff changeset
    81
    void *narrow_store_operator      (symbol_c *symbol);
838
13ea7c080018 Fix datatype analysis of conditional IL operators (CALC, CALCN, RETC, RETCN, JMPC, JMPCN, S and R)
mjsousa
parents: 836
diff changeset
    82
    void *narrow_conditional_operator(symbol_c *symbol);
945
477393b00f95 Add support for relaxed datatype model for array datatypes.
mjsousa
parents: 940
diff changeset
    83
    void *narrow_binary_operator     (const struct widen_entry widen_table[], symbol_c *symbol,                                     bool *deprecated_operation = NULL);
477393b00f95 Add support for relaxed datatype model for array datatypes.
mjsousa
parents: 940
diff changeset
    84
    void *narrow_binary_expression   (const struct widen_entry widen_table[], symbol_c *symbol, symbol_c *l_expr, symbol_c *r_expr, bool *deprecated_operation = NULL, bool allow_enums = false);
477393b00f95 Add support for relaxed datatype model for array datatypes.
mjsousa
parents: 940
diff changeset
    85
    void *narrow_equality_comparison (const struct widen_entry widen_table[], symbol_c *symbol, symbol_c *l_expr, symbol_c *r_expr, bool *deprecated_operation = NULL);
477393b00f95 Add support for relaxed datatype model for array datatypes.
mjsousa
parents: 940
diff changeset
    86
    void *narrow_var_declaration     (symbol_c *type);
478
b13feab3b918 Change setting of deprecated_operation from fill to narrow_candidate_datatypes_c.
Mario de Sousa <msousa@fe.up.pt>
parents: 466
diff changeset
    87
838
13ea7c080018 Fix datatype analysis of conditional IL operators (CALC, CALCN, RETC, RETCN, JMPC, JMPCN, S and R)
mjsousa
parents: 836
diff changeset
    88
    void *set_il_operand_datatype    (symbol_c *il_operand, symbol_c *datatype);
13ea7c080018 Fix datatype analysis of conditional IL operators (CALC, CALCN, RETC, RETCN, JMPC, JMPCN, S and R)
mjsousa
parents: 836
diff changeset
    89
455
933c0dccc82f Add support for semantic verification of CALC, CALCN, etc..
Mario de Sousa <msousa@fe.up.pt>
parents: 454
diff changeset
    90
438
744b125d911e Add support for semantic verification of function calls in IL.
Mario de Sousa <msousa@fe.up.pt>
parents: 423
diff changeset
    91
417
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    92
  public:
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    93
    narrow_candidate_datatypes_c(symbol_c *ignore);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    94
    virtual ~narrow_candidate_datatypes_c(void);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    95
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    96
    symbol_c *base_type(symbol_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    97
996
c752b113237b Do fill/narrow datatype analysis algorithm for derived_datatype_identifier_c (fixes bug related to arrays of arrays that was generating incorrect C code).
mjsousa
parents: 945
diff changeset
    98
    /*************************/
c752b113237b Do fill/narrow datatype analysis algorithm for derived_datatype_identifier_c (fixes bug related to arrays of arrays that was generating incorrect C code).
mjsousa
parents: 945
diff changeset
    99
    /* B.1 - Common elements */
c752b113237b Do fill/narrow datatype analysis algorithm for derived_datatype_identifier_c (fixes bug related to arrays of arrays that was generating incorrect C code).
mjsousa
parents: 945
diff changeset
   100
    /*************************/
c752b113237b Do fill/narrow datatype analysis algorithm for derived_datatype_identifier_c (fixes bug related to arrays of arrays that was generating incorrect C code).
mjsousa
parents: 945
diff changeset
   101
    /*******************************************/
c752b113237b Do fill/narrow datatype analysis algorithm for derived_datatype_identifier_c (fixes bug related to arrays of arrays that was generating incorrect C code).
mjsousa
parents: 945
diff changeset
   102
    /* B 1.1 - Letters, digits and identifiers */
c752b113237b Do fill/narrow datatype analysis algorithm for derived_datatype_identifier_c (fixes bug related to arrays of arrays that was generating incorrect C code).
mjsousa
parents: 945
diff changeset
   103
    /*******************************************/
c752b113237b Do fill/narrow datatype analysis algorithm for derived_datatype_identifier_c (fixes bug related to arrays of arrays that was generating incorrect C code).
mjsousa
parents: 945
diff changeset
   104
//  void *visit(                 identifier_c *symbol);
c752b113237b Do fill/narrow datatype analysis algorithm for derived_datatype_identifier_c (fixes bug related to arrays of arrays that was generating incorrect C code).
mjsousa
parents: 945
diff changeset
   105
    void *visit(derived_datatype_identifier_c *symbol);
c752b113237b Do fill/narrow datatype analysis algorithm for derived_datatype_identifier_c (fixes bug related to arrays of arrays that was generating incorrect C code).
mjsousa
parents: 945
diff changeset
   106
//  void *visit(         poutype_identifier_c *symbol);
c752b113237b Do fill/narrow datatype analysis algorithm for derived_datatype_identifier_c (fixes bug related to arrays of arrays that was generating incorrect C code).
mjsousa
parents: 945
diff changeset
   107
417
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   108
    /**********************/
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   109
    /* B 1.3 - Data types */
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   110
    /**********************/
797
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   111
    /***********************************/
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   112
    /* B 1.3.1 - Elementary Data Types */
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   113
    /***********************************/
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   114
    void *visit(    time_type_name_c    *symbol); 
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   115
    void *visit(    bool_type_name_c    *symbol); 
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   116
    void *visit(    sint_type_name_c    *symbol); 
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   117
    void *visit(    int_type_name_c     *symbol); 
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   118
    void *visit(    dint_type_name_c    *symbol); 
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   119
    void *visit(    lint_type_name_c    *symbol); 
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   120
    void *visit(    usint_type_name_c   *symbol); 
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   121
    void *visit(    uint_type_name_c    *symbol); 
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   122
    void *visit(    udint_type_name_c   *symbol); 
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   123
    void *visit(    ulint_type_name_c   *symbol); 
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   124
    void *visit(    real_type_name_c    *symbol); 
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   125
    void *visit(    lreal_type_name_c   *symbol); 
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   126
    void *visit(    date_type_name_c    *symbol); 
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   127
    void *visit(    tod_type_name_c     *symbol); 
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   128
    void *visit(    dt_type_name_c      *symbol); 
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   129
    void *visit(    byte_type_name_c    *symbol); 
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   130
    void *visit(    word_type_name_c    *symbol); 
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   131
    void *visit(    dword_type_name_c   *symbol); 
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   132
    void *visit(    lword_type_name_c   *symbol); 
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   133
    void *visit(    string_type_name_c  *symbol); 
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   134
    void *visit(    wstring_type_name_c *symbol); 
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   135
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   136
    void *visit(safetime_type_name_c    *symbol); 
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   137
    void *visit(safebool_type_name_c    *symbol); 
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   138
    void *visit(safesint_type_name_c    *symbol); 
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   139
    void *visit(safeint_type_name_c     *symbol); 
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   140
    void *visit(safedint_type_name_c    *symbol); 
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   141
    void *visit(safelint_type_name_c    *symbol); 
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   142
    void *visit(safeusint_type_name_c   *symbol); 
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   143
    void *visit(safeuint_type_name_c    *symbol); 
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   144
    void *visit(safeudint_type_name_c   *symbol); 
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   145
    void *visit(safeulint_type_name_c   *symbol); 
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   146
    void *visit(safereal_type_name_c    *symbol); 
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   147
    void *visit(safelreal_type_name_c   *symbol); 
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   148
    void *visit(safedate_type_name_c    *symbol); 
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   149
    void *visit(safetod_type_name_c     *symbol); 
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   150
    void *visit(safedt_type_name_c      *symbol); 
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   151
    void *visit(safebyte_type_name_c    *symbol); 
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   152
    void *visit(safeword_type_name_c    *symbol); 
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   153
    void *visit(safedword_type_name_c   *symbol); 
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   154
    void *visit(safelword_type_name_c   *symbol); 
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   155
    void *visit(safestring_type_name_c  *symbol); 
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   156
    void *visit(safewstring_type_name_c *symbol); 
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   157
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   158
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   159
    /********************************/
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   160
    /* B.1.3.2 - Generic data types */
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   161
    /********************************/
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   162
417
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   163
    /********************************/
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   164
    /* B 1.3.3 - Derived data types */
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   165
    /********************************/
726
9b61eb4f00dc Change the base datatype of enumerations to an enumerated_type_declaration_c (for named types!)
Mario de Sousa <msousa@fe.up.pt>
parents: 718
diff changeset
   166
//  void *visit(data_type_declaration_c *symbol);   /* Not required. already handled by iterator_visitor_c base class */
9b61eb4f00dc Change the base datatype of enumerations to an enumerated_type_declaration_c (for named types!)
Mario de Sousa <msousa@fe.up.pt>
parents: 718
diff changeset
   167
//  void *visit(type_declaration_list_c *symbol);   /* Not required. already handled by iterator_visitor_c base class */
806
f218434eeaf8 Fill in the symbol.datatype annotation in symbol classes used in derived data type declarations.
Mario de Sousa <msousa@fe.up.pt>
parents: 797
diff changeset
   168
    void *visit(simple_type_declaration_c *symbol); /* Not required. already handled by iterator_visitor_c base class */
726
9b61eb4f00dc Change the base datatype of enumerations to an enumerated_type_declaration_c (for named types!)
Mario de Sousa <msousa@fe.up.pt>
parents: 718
diff changeset
   169
    void *visit(simple_spec_init_c *symbol);
806
f218434eeaf8 Fill in the symbol.datatype annotation in symbol classes used in derived data type declarations.
Mario de Sousa <msousa@fe.up.pt>
parents: 797
diff changeset
   170
    void *visit(subrange_type_declaration_c *symbol);
f218434eeaf8 Fill in the symbol.datatype annotation in symbol classes used in derived data type declarations.
Mario de Sousa <msousa@fe.up.pt>
parents: 797
diff changeset
   171
    void *visit(subrange_spec_init_c *symbol);
f218434eeaf8 Fill in the symbol.datatype annotation in symbol classes used in derived data type declarations.
Mario de Sousa <msousa@fe.up.pt>
parents: 797
diff changeset
   172
    void *visit(subrange_specification_c *symbol);
417
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   173
    void *visit(subrange_c *symbol);
726
9b61eb4f00dc Change the base datatype of enumerations to an enumerated_type_declaration_c (for named types!)
Mario de Sousa <msousa@fe.up.pt>
parents: 718
diff changeset
   174
    void *visit(enumerated_type_declaration_c *symbol);
9b61eb4f00dc Change the base datatype of enumerations to an enumerated_type_declaration_c (for named types!)
Mario de Sousa <msousa@fe.up.pt>
parents: 718
diff changeset
   175
    void *visit(enumerated_spec_init_c *symbol);
9b61eb4f00dc Change the base datatype of enumerations to an enumerated_type_declaration_c (for named types!)
Mario de Sousa <msousa@fe.up.pt>
parents: 718
diff changeset
   176
    void *visit(enumerated_value_list_c *symbol);
9b61eb4f00dc Change the base datatype of enumerations to an enumerated_type_declaration_c (for named types!)
Mario de Sousa <msousa@fe.up.pt>
parents: 718
diff changeset
   177
//  void *visit(enumerated_value_c *symbol);        /* Not required */
806
f218434eeaf8 Fill in the symbol.datatype annotation in symbol classes used in derived data type declarations.
Mario de Sousa <msousa@fe.up.pt>
parents: 797
diff changeset
   178
    void *visit(array_type_declaration_c *symbol);
f218434eeaf8 Fill in the symbol.datatype annotation in symbol classes used in derived data type declarations.
Mario de Sousa <msousa@fe.up.pt>
parents: 797
diff changeset
   179
    void *visit(array_spec_init_c *symbol);
726
9b61eb4f00dc Change the base datatype of enumerations to an enumerated_type_declaration_c (for named types!)
Mario de Sousa <msousa@fe.up.pt>
parents: 718
diff changeset
   180
//  void *visit(array_specification_c *symbol);
9b61eb4f00dc Change the base datatype of enumerations to an enumerated_type_declaration_c (for named types!)
Mario de Sousa <msousa@fe.up.pt>
parents: 718
diff changeset
   181
//  void *visit(array_subrange_list_c *symbol);
9b61eb4f00dc Change the base datatype of enumerations to an enumerated_type_declaration_c (for named types!)
Mario de Sousa <msousa@fe.up.pt>
parents: 718
diff changeset
   182
//  void *visit(array_initial_elements_list_c *symbol);
9b61eb4f00dc Change the base datatype of enumerations to an enumerated_type_declaration_c (for named types!)
Mario de Sousa <msousa@fe.up.pt>
parents: 718
diff changeset
   183
//  void *visit(array_initial_elements_c *symbol);
806
f218434eeaf8 Fill in the symbol.datatype annotation in symbol classes used in derived data type declarations.
Mario de Sousa <msousa@fe.up.pt>
parents: 797
diff changeset
   184
    void *visit(structure_type_declaration_c *symbol);
f218434eeaf8 Fill in the symbol.datatype annotation in symbol classes used in derived data type declarations.
Mario de Sousa <msousa@fe.up.pt>
parents: 797
diff changeset
   185
    void *visit(initialized_structure_c *symbol);
726
9b61eb4f00dc Change the base datatype of enumerations to an enumerated_type_declaration_c (for named types!)
Mario de Sousa <msousa@fe.up.pt>
parents: 718
diff changeset
   186
//  void *visit(structure_element_declaration_list_c *symbol);
9b61eb4f00dc Change the base datatype of enumerations to an enumerated_type_declaration_c (for named types!)
Mario de Sousa <msousa@fe.up.pt>
parents: 718
diff changeset
   187
//  void *visit(structure_element_declaration_c *symbol);
9b61eb4f00dc Change the base datatype of enumerations to an enumerated_type_declaration_c (for named types!)
Mario de Sousa <msousa@fe.up.pt>
parents: 718
diff changeset
   188
//  void *visit(structure_element_initialization_list_c *symbol);
9b61eb4f00dc Change the base datatype of enumerations to an enumerated_type_declaration_c (for named types!)
Mario de Sousa <msousa@fe.up.pt>
parents: 718
diff changeset
   189
//  void *visit(structure_element_initialization_c *symbol);
9b61eb4f00dc Change the base datatype of enumerations to an enumerated_type_declaration_c (for named types!)
Mario de Sousa <msousa@fe.up.pt>
parents: 718
diff changeset
   190
//  void *visit(string_type_declaration_c *symbol);
810
d9c48ad646f1 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.
Mario de Sousa <msousa@fe.up.pt>
parents: 808
diff changeset
   191
    void *visit(fb_spec_init_c *symbol);
909
8b2a31dea131 Add support for REF_TO derived datatypes (along with datatype verification)
mjsousa
parents: 895
diff changeset
   192
      
8b2a31dea131 Add support for REF_TO derived datatypes (along with datatype verification)
mjsousa
parents: 895
diff changeset
   193
    void *visit(ref_spec_c *symbol);      // Defined in IEC 61131-3 v3
8b2a31dea131 Add support for REF_TO derived datatypes (along with datatype verification)
mjsousa
parents: 895
diff changeset
   194
    void *visit(ref_spec_init_c *symbol); // Defined in IEC 61131-3 v3
8b2a31dea131 Add support for REF_TO derived datatypes (along with datatype verification)
mjsousa
parents: 895
diff changeset
   195
    void *visit(ref_type_decl_c *symbol); // Defined in IEC 61131-3 v3
8b2a31dea131 Add support for REF_TO derived datatypes (along with datatype verification)
mjsousa
parents: 895
diff changeset
   196
417
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   197
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   198
    /*********************/
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   199
    /* B 1.4 - Variables */
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   200
    /*********************/
843
f9a059c24aea Fill in the 'datatype' anotation in the identifiers of symbolic variables.
mjsousa
parents: 839
diff changeset
   201
    void *visit(symbolic_variable_c *symbol);
417
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   202
    /********************************************/
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   203
    /* B 1.4.1 - Directly Represented Variables */
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   204
    /********************************************/
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   205
    /*************************************/
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   206
    /* B 1.4.2 - Multi-element variables */
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   207
    /*************************************/
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   208
    void *visit(array_variable_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   209
    void *visit(subscript_list_c *symbol);
827
e3800aff352c Fix datatype analysis of structured variables that contain arrays in their fields (e.g. var.x1[var2 + 42].y1).
mjsousa
parents: 813
diff changeset
   210
    void *visit(structured_variable_c *symbol);
417
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   211
502
a6211f73690b Start data type checking of var declarations (including direct variables!)
Mario de Sousa <msousa@fe.up.pt>
parents: 480
diff changeset
   212
    /******************************************/
a6211f73690b Start data type checking of var declarations (including direct variables!)
Mario de Sousa <msousa@fe.up.pt>
parents: 480
diff changeset
   213
    /* B 1.4.3 - Declaration & Initialisation */
a6211f73690b Start data type checking of var declarations (including direct variables!)
Mario de Sousa <msousa@fe.up.pt>
parents: 480
diff changeset
   214
    /******************************************/
945
477393b00f95 Add support for relaxed datatype model for array datatypes.
mjsousa
parents: 940
diff changeset
   215
    void *visit(var1_list_c                  *symbol);
477393b00f95 Add support for relaxed datatype model for array datatypes.
mjsousa
parents: 940
diff changeset
   216
    void *visit(location_c                   *symbol);
477393b00f95 Add support for relaxed datatype model for array datatypes.
mjsousa
parents: 940
diff changeset
   217
    void *visit(located_var_decl_c           *symbol);
477393b00f95 Add support for relaxed datatype model for array datatypes.
mjsousa
parents: 940
diff changeset
   218
    void *visit(var1_init_decl_c             *symbol);
477393b00f95 Add support for relaxed datatype model for array datatypes.
mjsousa
parents: 940
diff changeset
   219
    void *visit(array_var_init_decl_c        *symbol);
477393b00f95 Add support for relaxed datatype model for array datatypes.
mjsousa
parents: 940
diff changeset
   220
    void *visit(structured_var_init_decl_c   *symbol);
477393b00f95 Add support for relaxed datatype model for array datatypes.
mjsousa
parents: 940
diff changeset
   221
    void *visit(fb_name_decl_c               *symbol);
477393b00f95 Add support for relaxed datatype model for array datatypes.
mjsousa
parents: 940
diff changeset
   222
    void *visit(array_var_declaration_c      *symbol);
477393b00f95 Add support for relaxed datatype model for array datatypes.
mjsousa
parents: 940
diff changeset
   223
    void *visit(structured_var_declaration_c *symbol);
477393b00f95 Add support for relaxed datatype model for array datatypes.
mjsousa
parents: 940
diff changeset
   224
    void *visit(external_declaration_c       *symbol);
477393b00f95 Add support for relaxed datatype model for array datatypes.
mjsousa
parents: 940
diff changeset
   225
    void *visit(global_var_decl_c            *symbol);
477393b00f95 Add support for relaxed datatype model for array datatypes.
mjsousa
parents: 940
diff changeset
   226
    void *visit(incompl_located_var_decl_c   *symbol);
477393b00f95 Add support for relaxed datatype model for array datatypes.
mjsousa
parents: 940
diff changeset
   227
    //void *visit(single_byte_string_var_declaration_c *symbol);
477393b00f95 Add support for relaxed datatype model for array datatypes.
mjsousa
parents: 940
diff changeset
   228
    //void *visit(double_byte_string_var_declaration_c *symbol);
502
a6211f73690b Start data type checking of var declarations (including direct variables!)
Mario de Sousa <msousa@fe.up.pt>
parents: 480
diff changeset
   229
417
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   230
    /**************************************/
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   231
    /* B 1.5 - Program organization units */
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   232
    /**************************************/
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   233
    /***********************/
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   234
    /* B 1.5.1 - Functions */
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   235
    /***********************/
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   236
    void *visit(function_declaration_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   237
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   238
    /*****************************/
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   239
    /* B 1.5.2 - Function blocks */
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   240
    /*****************************/
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   241
    void *visit(function_block_declaration_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   242
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   243
    /**********************/
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   244
    /* B 1.5.3 - Programs */
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   245
    /**********************/
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   246
    void *visit(program_declaration_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   247
802
cac262d1d6a5 Fixed bug with SFC transition datatype checking
Laurent Bessard
parents: 797
diff changeset
   248
    /********************************************/
cac262d1d6a5 Fixed bug with SFC transition datatype checking
Laurent Bessard
parents: 797
diff changeset
   249
    /* B 1.6 Sequential function chart elements */
cac262d1d6a5 Fixed bug with SFC transition datatype checking
Laurent Bessard
parents: 797
diff changeset
   250
    /********************************************/
cac262d1d6a5 Fixed bug with SFC transition datatype checking
Laurent Bessard
parents: 797
diff changeset
   251
    void *visit(transition_condition_c *symbol);
cac262d1d6a5 Fixed bug with SFC transition datatype checking
Laurent Bessard
parents: 797
diff changeset
   252
417
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   253
    /********************************/
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   254
    /* B 1.7 Configuration elements */
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   255
    /********************************/
945
477393b00f95 Add support for relaxed datatype model for array datatypes.
mjsousa
parents: 940
diff changeset
   256
    void *visit(configuration_declaration_c   *symbol);
477393b00f95 Add support for relaxed datatype model for array datatypes.
mjsousa
parents: 940
diff changeset
   257
    void *visit(resource_declaration_c        *symbol);
477393b00f95 Add support for relaxed datatype model for array datatypes.
mjsousa
parents: 940
diff changeset
   258
    void *visit(single_resource_declaration_c *symbol);
477393b00f95 Add support for relaxed datatype model for array datatypes.
mjsousa
parents: 940
diff changeset
   259
417
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   260
    /****************************************/
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   261
    /* B.2 - Language IL (Instruction List) */
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   262
    /****************************************/
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   263
    /***********************************/
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   264
    /* B 2.1 Instructions and Operands */
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   265
    /***********************************/
443
ff4d26b7e51d Narrow IL code backwords, so as to correctly handle invocations to overloaded functions from IL code.
Mario de Sousa <msousa@fe.up.pt>
parents: 438
diff changeset
   266
    void *visit(instruction_list_c *symbol);
454
099aa5d655de Finish support for semantic verification of IL paranthesised expressions.
Mario de Sousa <msousa@fe.up.pt>
parents: 453
diff changeset
   267
    void *visit(il_instruction_c *symbol);
417
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   268
    void *visit(il_simple_operation_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   269
    void *visit(il_function_call_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   270
    void *visit(il_expression_c *symbol);
466
d97a29b7fa8b Narrow IL lists twice, in order to handle JMP to labels before the JMP itself.
Mario de Sousa <msousa@fe.up.pt>
parents: 459
diff changeset
   271
    void *visit(il_jump_operation_c *symbol);
417
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   272
    void *visit(il_fb_call_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   273
    void *visit(il_formal_funct_call_c *symbol);
452
79ac274d1cc4 Start of support for IL expressions (parenthesis).
Mario de Sousa <msousa@fe.up.pt>
parents: 448
diff changeset
   274
//  void *visit(il_operand_list_c *symbol);
79ac274d1cc4 Start of support for IL expressions (parenthesis).
Mario de Sousa <msousa@fe.up.pt>
parents: 448
diff changeset
   275
    void *visit(simple_instr_list_c *symbol);
453
4733f662362a More changes for support of semantic verification of il_expressions
Mario de Sousa <msousa@fe.up.pt>
parents: 452
diff changeset
   276
    void *visit(il_simple_instruction_c*symbol);
452
79ac274d1cc4 Start of support for IL expressions (parenthesis).
Mario de Sousa <msousa@fe.up.pt>
parents: 448
diff changeset
   277
//  void *visit(il_param_list_c *symbol);
79ac274d1cc4 Start of support for IL expressions (parenthesis).
Mario de Sousa <msousa@fe.up.pt>
parents: 448
diff changeset
   278
//  void *visit(il_param_assignment_c *symbol);
79ac274d1cc4 Start of support for IL expressions (parenthesis).
Mario de Sousa <msousa@fe.up.pt>
parents: 448
diff changeset
   279
//  void *visit(il_param_out_assignment_c *symbol);
417
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   280
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   281
    /*******************/
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   282
    /* B 2.2 Operators */
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   283
    /*******************/
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   284
    void *visit(LD_operator_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   285
    void *visit(LDN_operator_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   286
    void *visit(ST_operator_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   287
    void *visit(STN_operator_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   288
    void *visit(NOT_operator_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   289
    void *visit(S_operator_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   290
    void *visit(R_operator_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   291
    void *visit(S1_operator_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   292
    void *visit(R1_operator_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   293
    void *visit(CLK_operator_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   294
    void *visit(CU_operator_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   295
    void *visit(CD_operator_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   296
    void *visit(PV_operator_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   297
    void *visit(IN_operator_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   298
    void *visit(PT_operator_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   299
    void *visit(AND_operator_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   300
    void *visit(OR_operator_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   301
    void *visit(XOR_operator_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   302
    void *visit(ANDN_operator_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   303
    void *visit(ORN_operator_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   304
    void *visit(XORN_operator_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   305
    void *visit(ADD_operator_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   306
    void *visit(SUB_operator_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   307
    void *visit(MUL_operator_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   308
    void *visit(DIV_operator_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   309
    void *visit(MOD_operator_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   310
    void *visit(GT_operator_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   311
    void *visit(GE_operator_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   312
    void *visit(EQ_operator_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   313
    void *visit(LT_operator_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   314
    void *visit(LE_operator_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   315
    void *visit(NE_operator_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   316
    void *visit(CAL_operator_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   317
    void *visit(CALC_operator_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   318
    void *visit(CALCN_operator_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   319
    void *visit(RET_operator_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   320
    void *visit(RETC_operator_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   321
    void *visit(RETCN_operator_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   322
    void *visit(JMP_operator_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   323
    void *visit(JMPC_operator_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   324
    void *visit(JMPCN_operator_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   325
    /* Symbol class handled together with function call checks */
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   326
    // void *visit(il_assign_operator_c *symbol, variable_name);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   327
    /* Symbol class handled together with function call checks */
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   328
    // void *visit(il_assign_operator_c *symbol, option, variable_name);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   329
    /***************************************/
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   330
    /* B.3 - Language ST (Structured Text) */
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   331
    /***************************************/
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   332
    /***********************/
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   333
    /* B 3.1 - Expressions */
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   334
    /***********************/
936
0f7bcc160568 Fix bug: Add support for de-referencing pointers to struct (struct_ptr^.elem1) when used inside FB.
mjsousa
parents: 933
diff changeset
   335
    void *visit(   deref_operator_c   *symbol);
933
76324f461aed Add support for de-referencing of REF_TO datatypes (Note: dereferencing of arrays and structs not yet supported!)
mjsousa
parents: 909
diff changeset
   336
    void *visit(   deref_expression_c *symbol);
76324f461aed Add support for de-referencing of REF_TO datatypes (Note: dereferencing of arrays and structs not yet supported!)
mjsousa
parents: 909
diff changeset
   337
    void *visit(     ref_expression_c *symbol);
76324f461aed Add support for de-referencing of REF_TO datatypes (Note: dereferencing of arrays and structs not yet supported!)
mjsousa
parents: 909
diff changeset
   338
    void *visit(      or_expression_c *symbol);
76324f461aed Add support for de-referencing of REF_TO datatypes (Note: dereferencing of arrays and structs not yet supported!)
mjsousa
parents: 909
diff changeset
   339
    void *visit(     xor_expression_c *symbol);
76324f461aed Add support for de-referencing of REF_TO datatypes (Note: dereferencing of arrays and structs not yet supported!)
mjsousa
parents: 909
diff changeset
   340
    void *visit(     and_expression_c *symbol);
76324f461aed Add support for de-referencing of REF_TO datatypes (Note: dereferencing of arrays and structs not yet supported!)
mjsousa
parents: 909
diff changeset
   341
    void *visit(     equ_expression_c *symbol);
76324f461aed Add support for de-referencing of REF_TO datatypes (Note: dereferencing of arrays and structs not yet supported!)
mjsousa
parents: 909
diff changeset
   342
    void *visit(  notequ_expression_c *symbol);
76324f461aed Add support for de-referencing of REF_TO datatypes (Note: dereferencing of arrays and structs not yet supported!)
mjsousa
parents: 909
diff changeset
   343
    void *visit(      lt_expression_c *symbol);
76324f461aed Add support for de-referencing of REF_TO datatypes (Note: dereferencing of arrays and structs not yet supported!)
mjsousa
parents: 909
diff changeset
   344
    void *visit(      gt_expression_c *symbol);
76324f461aed Add support for de-referencing of REF_TO datatypes (Note: dereferencing of arrays and structs not yet supported!)
mjsousa
parents: 909
diff changeset
   345
    void *visit(      le_expression_c *symbol);
76324f461aed Add support for de-referencing of REF_TO datatypes (Note: dereferencing of arrays and structs not yet supported!)
mjsousa
parents: 909
diff changeset
   346
    void *visit(      ge_expression_c *symbol);
76324f461aed Add support for de-referencing of REF_TO datatypes (Note: dereferencing of arrays and structs not yet supported!)
mjsousa
parents: 909
diff changeset
   347
    void *visit(     add_expression_c *symbol);
76324f461aed Add support for de-referencing of REF_TO datatypes (Note: dereferencing of arrays and structs not yet supported!)
mjsousa
parents: 909
diff changeset
   348
    void *visit(     sub_expression_c *symbol);
76324f461aed Add support for de-referencing of REF_TO datatypes (Note: dereferencing of arrays and structs not yet supported!)
mjsousa
parents: 909
diff changeset
   349
    void *visit(     mul_expression_c *symbol);
76324f461aed Add support for de-referencing of REF_TO datatypes (Note: dereferencing of arrays and structs not yet supported!)
mjsousa
parents: 909
diff changeset
   350
    void *visit(     div_expression_c *symbol);
76324f461aed Add support for de-referencing of REF_TO datatypes (Note: dereferencing of arrays and structs not yet supported!)
mjsousa
parents: 909
diff changeset
   351
    void *visit(     mod_expression_c *symbol);
76324f461aed Add support for de-referencing of REF_TO datatypes (Note: dereferencing of arrays and structs not yet supported!)
mjsousa
parents: 909
diff changeset
   352
    void *visit(   power_expression_c *symbol);
76324f461aed Add support for de-referencing of REF_TO datatypes (Note: dereferencing of arrays and structs not yet supported!)
mjsousa
parents: 909
diff changeset
   353
    void *visit(     neg_expression_c *symbol);
76324f461aed Add support for de-referencing of REF_TO datatypes (Note: dereferencing of arrays and structs not yet supported!)
mjsousa
parents: 909
diff changeset
   354
    void *visit(     not_expression_c *symbol);
417
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   355
    void *visit(function_invocation_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   356
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   357
    /*********************************/
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   358
    /* B 3.2.1 Assignment Statements */
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   359
    /*********************************/
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   360
    void *visit(assignment_statement_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   361
423
f4a2d400ddbd Adding support for semantic verification of FB calls in ST.
Mario de Sousa <msousa@fe.up.pt>
parents: 421
diff changeset
   362
    /*****************************************/
f4a2d400ddbd Adding support for semantic verification of FB calls in ST.
Mario de Sousa <msousa@fe.up.pt>
parents: 421
diff changeset
   363
    /* B 3.2.2 Subprogram Control Statements */
f4a2d400ddbd Adding support for semantic verification of FB calls in ST.
Mario de Sousa <msousa@fe.up.pt>
parents: 421
diff changeset
   364
    /*****************************************/
f4a2d400ddbd Adding support for semantic verification of FB calls in ST.
Mario de Sousa <msousa@fe.up.pt>
parents: 421
diff changeset
   365
    void *visit(fb_invocation_c *symbol);
f4a2d400ddbd Adding support for semantic verification of FB calls in ST.
Mario de Sousa <msousa@fe.up.pt>
parents: 421
diff changeset
   366
    
417
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   367
    /********************************/
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   368
    /* B 3.2.3 Selection Statements */
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   369
    /********************************/
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   370
    void *visit(if_statement_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   371
    void *visit(elseif_statement_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   372
    void *visit(case_statement_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   373
    void *visit(case_element_list_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   374
    void *visit(case_element_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   375
    void *visit(case_list_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   376
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   377
    /********************************/
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   378
    /* B 3.2.4 Iteration Statements */
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   379
    /********************************/
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   380
    void *visit(for_statement_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   381
    void *visit(while_statement_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   382
    void *visit(repeat_statement_c *symbol);
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   383
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   384
}; // narrow_candidate_datatypes_c
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   385
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   386
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   387
d48f53715f77 Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
   388
673
90d7636e3c39 Delete unused variables.
Mario de Sousa <msousa@fe.up.pt>
parents: 652
diff changeset
   389
#endif // #ifndef _NARROW_CANDIDATE_DATATYPES_HH
90d7636e3c39 Delete unused variables.
Mario de Sousa <msousa@fe.up.pt>
parents: 652
diff changeset
   390
90d7636e3c39 Delete unused variables.
Mario de Sousa <msousa@fe.up.pt>
parents: 652
diff changeset
   391
90d7636e3c39 Delete unused variables.
Mario de Sousa <msousa@fe.up.pt>
parents: 652
diff changeset
   392