stage4/generate_iec/generate_iec.cc
changeset 267 0a1204bcc9af
parent 257 90782e241346
child 279 c0453b7f99df
equal deleted inserted replaced
266:2f6d8866ec8d 267:0a1204bcc9af
     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
       
     6  * License, or (at your option) any later version.
       
     7  *
     5  *
     8  * This program is distributed in the hope that it will be useful, but
     6  *  This program is free software: you can redistribute it and/or modify
     9  * WITHOUT ANY WARRANTY; without even the implied warranty of
     7  *  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
     8  *  the Free Software Foundation, either version 3 of the License, or
    11  * Public License for more details.
     9  *  (at your option) any later version.
       
    10  *
       
    11  *  This program is distributed in the hope that it will be useful,
       
    12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
       
    14  *  GNU General Public License for more details.
       
    15  *
       
    16  *  You should have received a copy of the GNU General Public License
       
    17  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
       
    18  *
    12  *
    19  *
    13  * This code is made available on the understanding that it will not be
    20  * 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.
    21  * used in safety-critical situations without a full and competent review.
    15  */
    22  */
    16 
    23 
    17 /*
    24 /*
    18  * An IEC 61131-3 IL and ST compiler.
    25  * An IEC 61131-3 compiler.
    19  *
    26  *
    20  * Based on the
    27  * Based on the
    21  * FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10)
    28  * FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10)
    22  *
    29  *
    23  */
    30  */
   145 #endif
   152 #endif
   146 
   153 
   147 
   154 
   148 
   155 
   149 
   156 
   150 /***************************/
   157 /******************/
   151 /* 2.1.6 Pragmas */
   158 /* 2.1.6 Pragmas  */
   152 /***************************/
   159 /******************/
   153 void *visit(pragma_c *symbol) {return print_token(symbol);}
   160 void *visit(enable_code_generation_pragma_c*)  {s4o.print("{enable code generation}");  return NULL;}
       
   161 void *visit(disable_code_generation_pragma_c*) {s4o.print("{disable code generation}"); return NULL;}
       
   162 void *visit(pragma_c *symbol)                  {return print_token(symbol);}
   154 
   163 
   155 
   164 
   156 /***************************/
   165 /***************************/
   157 /* B 0 - Programming Model */
   166 /* B 0 - Programming Model */
   158 /***************************/
   167 /***************************/