stage3/narrow_candidate_datatypes.hh
author Andrey Skvortsov <andrej.skvortzov@gmail.com>
Sun, 14 Oct 2018 20:14:13 +0300
changeset 1073 24ef30a9bcee
parent 1054 57c08195c962
permissions -rw-r--r--
revert commits improved performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)

Following commits are reverted:
mjsousa 0b275a2 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- increase hardcoded limit to 499
mjsousa 2228799 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR) -- Add comments!!
mjsousa ce81fa6 improve performance of some extensible Standard Functions (ADD, MUL, AND, OR, XOR)"

The reason is that they cause regression in some cases (if function is
used as argument for function block, for example) and this is not
fixed for a long time.
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
1054
57c08195c962 Fix bug in datatype narrowing algorithm affecting IL code.
Mario de Sousa <msousa@fe.up.pt>
parents: 1040
diff changeset
    72
  protected:  
57c08195c962 Fix bug in datatype narrowing algorithm affecting IL code.
Mario de Sousa <msousa@fe.up.pt>
parents: 1040
diff changeset
    73
    virtual void set_datatype_in_prev_il_instructions(symbol_c *datatype, il_instruction_c *symbol);
57c08195c962 Fix bug in datatype narrowing algorithm affecting IL code.
Mario de Sousa <msousa@fe.up.pt>
parents: 1040
diff changeset
    74
57c08195c962 Fix bug in datatype narrowing algorithm affecting IL code.
Mario de Sousa <msousa@fe.up.pt>
parents: 1040
diff changeset
    75
  private:
480
8a58d7b8b26c Add MOD widening table, and some code clean-ups.
Mario de Sousa <msousa@fe.up.pt>
parents: 478
diff changeset
    76
    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
    77
838
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_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
    79
    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
    80
    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
    81
    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
    82
    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
    83
    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
    84
    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
    85
    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
    86
    void *narrow_conditional_operator(symbol_c *symbol);
945
477393b00f95 Add support for relaxed datatype model for array datatypes.
mjsousa
parents: 940
diff changeset
    87
    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
    88
    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
    89
    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
    90
    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
    91
838
13ea7c080018 Fix datatype analysis of conditional IL operators (CALC, CALCN, RETC, RETCN, JMPC, JMPCN, S and R)
mjsousa
parents: 836
diff changeset
    92
    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
    93
455
933c0dccc82f Add support for semantic verification of CALC, CALCN, etc..
Mario de Sousa <msousa@fe.up.pt>
parents: 454
diff changeset
    94
438
744b125d911e Add support for semantic verification of function calls in IL.
Mario de Sousa <msousa@fe.up.pt>
parents: 423
diff changeset
    95
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
    96
  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
    97
    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
    98
    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
    99
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
   100
    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
   101
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
   102
    /*************************/
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
    /* 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
   104
    /*************************/
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
    /*******************************************/
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
    /* 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
   107
    /*******************************************/
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
   108
//  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
   109
    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
   110
//  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
   111
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
   112
    /**********************/
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
   113
    /* 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
   114
    /**********************/
797
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   115
    /***********************************/
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   116
    /* 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
   117
    /***********************************/
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   118
    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
   119
    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
   120
    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
   121
    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
   122
    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
   123
    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
   124
    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
   125
    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
   126
    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
   127
    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
   128
    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
   129
    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
   130
    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
   131
    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
   132
    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
   133
    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
   134
    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
   135
    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
   136
    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
   137
    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
   138
    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
   139
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   140
    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
   141
    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
   142
    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
   143
    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
   144
    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
   145
    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
   146
    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
   147
    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
   148
    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
   149
    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
   150
    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
   151
    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
   152
    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
   153
    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
   154
    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
   155
    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
   156
    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
   157
    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
   158
    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
   159
    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
   160
    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
   161
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   162
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   163
    /********************************/
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   164
    /* 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
   165
    /********************************/
3444c331efc9 Fill in the symbol->datatype of elementary datatypes.
Mario de Sousa <msousa@fe.up.pt>
parents: 726
diff changeset
   166
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
   167
    /********************************/
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
   168
    /* 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
   169
    /********************************/
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
   170
//  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
   171
//  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
   172
    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
   173
    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
   174
    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
   175
    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
   176
    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
   177
    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
   178
    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
   179
    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
   180
    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
   181
//  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
   182
    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
   183
    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
   184
//  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
   185
//  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
   186
//  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
   187
//  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
   188
    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
   189
    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
   190
//  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
   191
//  void *visit(structure_element_declaration_c *symbol);
1040
e8563dcaefca Start implementation of datatype checking of initial values for structures and FBs.
Mario de Sousa <msousa@fe.up.pt>
parents: 1028
diff changeset
   192
    void *visit(structure_element_initialization_list_c *symbol);
e8563dcaefca Start implementation of datatype checking of initial values for structures and FBs.
Mario de Sousa <msousa@fe.up.pt>
parents: 1028
diff changeset
   193
    void *visit(structure_element_initialization_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
   194
//  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
   195
    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
   196
      
8b2a31dea131 Add support for REF_TO derived datatypes (along with datatype verification)
mjsousa
parents: 895
diff changeset
   197
    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
   198
    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
   199
    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
   200
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
   201
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 - 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
    /*********************/
843
f9a059c24aea Fill in the 'datatype' anotation in the identifiers of symbolic variables.
mjsousa
parents: 839
diff changeset
   205
    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
   206
    /********************************************/
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
    /* 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
   208
    /********************************************/
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
    /*************************************/
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
   210
    /* 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
   211
    /*************************************/
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
   212
    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
   213
    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
   214
    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
   215
502
a6211f73690b Start data type checking of var declarations (including direct variables!)
Mario de Sousa <msousa@fe.up.pt>
parents: 480
diff changeset
   216
    /******************************************/
a6211f73690b Start data type checking of var declarations (including direct variables!)
Mario de Sousa <msousa@fe.up.pt>
parents: 480
diff changeset
   217
    /* 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
   218
    /******************************************/
945
477393b00f95 Add support for relaxed datatype model for array datatypes.
mjsousa
parents: 940
diff changeset
   219
    void *visit(var1_list_c                  *symbol);
477393b00f95 Add support for relaxed datatype model for array datatypes.
mjsousa
parents: 940
diff changeset
   220
    void *visit(location_c                   *symbol);
477393b00f95 Add support for relaxed datatype model for array datatypes.
mjsousa
parents: 940
diff changeset
   221
    void *visit(located_var_decl_c           *symbol);
477393b00f95 Add support for relaxed datatype model for array datatypes.
mjsousa
parents: 940
diff changeset
   222
    void *visit(var1_init_decl_c             *symbol);
477393b00f95 Add support for relaxed datatype model for array datatypes.
mjsousa
parents: 940
diff changeset
   223
    void *visit(array_var_init_decl_c        *symbol);
477393b00f95 Add support for relaxed datatype model for array datatypes.
mjsousa
parents: 940
diff changeset
   224
    void *visit(structured_var_init_decl_c   *symbol);
477393b00f95 Add support for relaxed datatype model for array datatypes.
mjsousa
parents: 940
diff changeset
   225
    void *visit(fb_name_decl_c               *symbol);
477393b00f95 Add support for relaxed datatype model for array datatypes.
mjsousa
parents: 940
diff changeset
   226
    void *visit(array_var_declaration_c      *symbol);
477393b00f95 Add support for relaxed datatype model for array datatypes.
mjsousa
parents: 940
diff changeset
   227
    void *visit(structured_var_declaration_c *symbol);
477393b00f95 Add support for relaxed datatype model for array datatypes.
mjsousa
parents: 940
diff changeset
   228
    void *visit(external_declaration_c       *symbol);
477393b00f95 Add support for relaxed datatype model for array datatypes.
mjsousa
parents: 940
diff changeset
   229
    void *visit(global_var_decl_c            *symbol);
477393b00f95 Add support for relaxed datatype model for array datatypes.
mjsousa
parents: 940
diff changeset
   230
    void *visit(incompl_located_var_decl_c   *symbol);
477393b00f95 Add support for relaxed datatype model for array datatypes.
mjsousa
parents: 940
diff changeset
   231
    //void *visit(single_byte_string_var_declaration_c *symbol);
477393b00f95 Add support for relaxed datatype model for array datatypes.
mjsousa
parents: 940
diff changeset
   232
    //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
   233
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
   234
    /**************************************/
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
    /* 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
   236
    /**************************************/
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
    /* 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
   239
    /***********************/
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
    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
   241
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
    /* 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
   244
    /*****************************/
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
    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
   246
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
    /**********************/
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
   248
    /* 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
   249
    /**********************/
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
   250
    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
   251
802
cac262d1d6a5 Fixed bug with SFC transition datatype checking
Laurent Bessard
parents: 797
diff changeset
   252
    /********************************************/
cac262d1d6a5 Fixed bug with SFC transition datatype checking
Laurent Bessard
parents: 797
diff changeset
   253
    /* B 1.6 Sequential function chart elements */
cac262d1d6a5 Fixed bug with SFC transition datatype checking
Laurent Bessard
parents: 797
diff changeset
   254
    /********************************************/
cac262d1d6a5 Fixed bug with SFC transition datatype checking
Laurent Bessard
parents: 797
diff changeset
   255
    void *visit(transition_condition_c *symbol);
1028
7c8709ce6b8f Correcty determine the datatype (TIME) of the parameters of SFC actions with timed qualifiers
mjsousa
parents: 996
diff changeset
   256
    void *visit(action_qualifier_c     *symbol);
802
cac262d1d6a5 Fixed bug with SFC transition datatype checking
Laurent Bessard
parents: 797
diff changeset
   257
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
   258
    /********************************/
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
   259
    /* 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
   260
    /********************************/
945
477393b00f95 Add support for relaxed datatype model for array datatypes.
mjsousa
parents: 940
diff changeset
   261
    void *visit(configuration_declaration_c   *symbol);
477393b00f95 Add support for relaxed datatype model for array datatypes.
mjsousa
parents: 940
diff changeset
   262
    void *visit(resource_declaration_c        *symbol);
477393b00f95 Add support for relaxed datatype model for array datatypes.
mjsousa
parents: 940
diff changeset
   263
    void *visit(single_resource_declaration_c *symbol);
477393b00f95 Add support for relaxed datatype model for array datatypes.
mjsousa
parents: 940
diff changeset
   264
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
   265
    /****************************************/
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
   266
    /* 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
   267
    /****************************************/
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
    /***********************************/
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
    /* 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
   270
    /***********************************/
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
   271
    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
   272
    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
   273
    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
   274
    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
   275
    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
   276
    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
   277
    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
   278
    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
   279
//  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
   280
    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
   281
    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
   282
//  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
   283
//  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
   284
//  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
   285
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
    /*******************/
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
    /* 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
   288
    /*******************/
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(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
   290
    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
   291
    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
   292
    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
   293
    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
   294
    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
   295
    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
   296
    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
   297
    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
   298
    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
   299
    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
   300
    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
   301
    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
   302
    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
   303
    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
   304
    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
   305
    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
   306
    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
   307
    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
   308
    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
   309
    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
   310
    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
   311
    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
   312
    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
   313
    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
   314
    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
   315
    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
   316
    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
   317
    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
   318
    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
   319
    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
   320
    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
   321
    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
   322
    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
   323
    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
   324
    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
   325
    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
   326
    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
   327
    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
   328
    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
   329
    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
   330
    /* 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
   331
    // 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
   332
    /* 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
   333
    // 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
   334
    /***************************************/
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
   335
    /* 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
   336
    /***************************************/
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
   337
    /***********************/
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
   338
    /* 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
   339
    /***********************/
936
0f7bcc160568 Fix bug: Add support for de-referencing pointers to struct (struct_ptr^.elem1) when used inside FB.
mjsousa
parents: 933
diff changeset
   340
    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
   341
    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
   342
    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
   343
    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
   344
    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
   345
    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
   346
    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
   347
    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
   348
    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
   349
    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
   350
    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
   351
    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
   352
    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
   353
    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
   354
    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
   355
    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
   356
    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
   357
    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
   358
    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
   359
    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
   360
    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
   361
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
   362
    /*********************************/
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
   363
    /* 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
   364
    /*********************************/
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
   365
    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
   366
423
f4a2d400ddbd Adding support for semantic verification of FB calls in ST.
Mario de Sousa <msousa@fe.up.pt>
parents: 421
diff changeset
   367
    /*****************************************/
f4a2d400ddbd Adding support for semantic verification of FB calls in ST.
Mario de Sousa <msousa@fe.up.pt>
parents: 421
diff changeset
   368
    /* 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
   369
    /*****************************************/
f4a2d400ddbd Adding support for semantic verification of FB calls in ST.
Mario de Sousa <msousa@fe.up.pt>
parents: 421
diff changeset
   370
    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
   371
    
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
   372
    /********************************/
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
    /* 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
   374
    /********************************/
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(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
   376
    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
   377
    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
   378
    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
   379
    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
   380
    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
   381
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
    /********************************/
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
    /* 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
   384
    /********************************/
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
    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
   386
    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
   387
    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
   388
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
   389
}; // 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
   390
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
   391
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
   392
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
   393
673
90d7636e3c39 Delete unused variables.
Mario de Sousa <msousa@fe.up.pt>
parents: 652
diff changeset
   394
#endif // #ifndef _NARROW_CANDIDATE_DATATYPES_HH
90d7636e3c39 Delete unused variables.
Mario de Sousa <msousa@fe.up.pt>
parents: 652
diff changeset
   395
90d7636e3c39 Delete unused variables.
Mario de Sousa <msousa@fe.up.pt>
parents: 652
diff changeset
   396
90d7636e3c39 Delete unused variables.
Mario de Sousa <msousa@fe.up.pt>
parents: 652
diff changeset
   397