stage4/generate_c/generate_c_configbody.cc
changeset 279 c0453b7f99df
parent 70 e1f0ebd2d9ec
child 945 477393b00f95
equal deleted inserted replaced
278:050d31dd7c74 279:c0453b7f99df
     1 /*
     1 /*
     2  * (c) 2003 Mario de Sousa
     2  *  matiec - a compiler for the programming languages defined in IEC 61131-3
     3  *
     3  *
     4  * Offered to the public under the terms of the GNU General Public License
     4  *  Copyright (C) 2003-2011  Mario de Sousa (msousa@fe.up.pt)
     5  * as published by the Free Software Foundation; either version 2 of the
     5  *  Copyright (C) 2007-2011  Laurent Bessard and Edouard Tisserant
     6  * License, or (at your option) any later version.
       
     7  *
     6  *
     8  * This program is distributed in the hope that it will be useful, but
     7  *  This program is free software: you can redistribute it and/or modify
     9  * WITHOUT ANY WARRANTY; without even the implied warranty of
     8  *  it under the terms of the GNU General Public License as published by
    10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
     9  *  the Free Software Foundation, either version 3 of the License, or
    11  * Public License for more details.
    10  *  (at your option) any later version.
       
    11  *
       
    12  *  This program is distributed in the hope that it will be useful,
       
    13  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    14  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
       
    15  *  GNU General Public License for more details.
       
    16  *
       
    17  *  You should have received a copy of the GNU General Public License
       
    18  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
       
    19  *
    12  *
    20  *
    13  * This code is made available on the understanding that it will not be
    21  * 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.
    22  * used in safety-critical situations without a full and competent review.
    15  */
    23  */
    16 
       
    17 /*
       
    18  * An IEC 61131-3 IL and ST compiler.
       
    19  *
       
    20  * Based on the
       
    21  * FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10)
       
    22  *
       
    23  */
       
    24 
       
    25 
       
    26 /*
       
    27  * Build the body of the main function (currently named run() )
       
    28  * of the class onto which is mapped a specific CONFIGURATION.
       
    29  *
       
    30  * This is part of the 4th stage that generates
       
    31  * a c++ source program equivalent to the IL and ST
       
    32  * code.
       
    33  */
       
    34 
       
    35 
       
    36 
       
    37 
       
    38 
       
    39 
       
    40 // #include <stdio.h>  /* required for NULL */
       
    41 /*
       
    42 #include <string>
       
    43 #include <iostream>
       
    44 
       
    45 #include "../../util/symtable.hh"
       
    46 
       
    47 #include "../stage4.hh"
       
    48 */
       
    49 
       
    50 
       
    51 
       
    52 
       
    53 
    24 
    54 class generate_c_configbody_c: public generate_c_base_c {
    25 class generate_c_configbody_c: public generate_c_base_c {
    55 
    26 
    56   public:
    27   public:
    57     generate_c_configbody_c(stage4out_c *s4o_ptr)
    28     generate_c_configbody_c(stage4out_c *s4o_ptr)