stage3/stage3.cc
changeset 204 8ffa211b7f9a
child 257 90782e241346
equal deleted inserted replaced
203:b8a2f4c86745 204:8ffa211b7f9a
       
     1 /*
       
     2  * (c) 20099 Catarina da Costa Boucinha
       
     3  *
       
     4  * Offered to the public under the terms of the GNU General Public License
       
     5  * as published by the Free Software Foundation; either version 2 of the
       
     6  * License, or (at your option) any later version.
       
     7  *
       
     8  * This program is distributed in the hope that it will be useful, but
       
     9  * WITHOUT ANY WARRANTY; without even the implied warranty of
       
    10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
       
    11  * Public License for more details.
       
    12  *
       
    13  * This code is made available on the understanding that it will not be
       
    14  * used in safety-critical situations without a full and competent review.
       
    15  */
       
    16 
       
    17 /*
       
    18  * An IEC 61131-3 IL and ST compiler.
       
    19  *
       
    20  * Based on the
       
    21  * FINAL DRAFT - IEC 61131-3, 2nd Ed. (2009-04-24)
       
    22  *
       
    23  */
       
    24 
       
    25 #include "stage3.hh"
       
    26 
       
    27 int type_safety(symbol_c *tree_root){
       
    28 	visit_expression_type_c visit_expression_type(tree_root);
       
    29 
       
    30 	(*tree_root).accept(visit_expression_type);
       
    31 
       
    32 	return 0;
       
    33 }
       
    34 
       
    35 int stage3(symbol_c *tree_root){
       
    36 	return type_safety(tree_root);
       
    37 }