absyntax_utils/search_base_type.hh
changeset 270 f1674941c3ad
parent 265 4d222f46f8cc
child 279 c0453b7f99df
equal deleted inserted replaced
256:101c7f148b9a 270:f1674941c3ad
     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  *
     6  * License, or (at your option) any later version.
     6  *  This program is free software: you can redistribute it and/or modify
     7  *
     7  *  it under the terms of the GNU General Public License as published by
     8  * This program is distributed in the hope that it will be useful, but
     8  *  the Free Software Foundation, either version 3 of the License, or
     9  * WITHOUT ANY WARRANTY; without even the implied warranty of
     9  *  (at your option) any later version.
    10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
    10  *
    11  * Public License for more details.
    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  */
    69       * numeric literal '30' must then be considered a LINT so the ADD function may be called
    76       * numeric literal '30' must then be considered a LINT so the ADD function may be called
    70       * with all inputs of the same data type.
    77       * with all inputs of the same data type.
    71       * If 'x' were a SINT, then the '30' would have to be a SINT too!
    78       * If 'x' were a SINT, then the '30' would have to be a SINT too!
    72       */
    79       */
    73     void *visit(real_c *symbol);
    80     void *visit(real_c *symbol);
       
    81     void *visit(neg_real_c *symbol);
    74     void *visit(integer_c *symbol);
    82     void *visit(integer_c *symbol);
       
    83     void *visit(neg_integer_c *symbol);
    75     void *visit(binary_integer_c *symbol);
    84     void *visit(binary_integer_c *symbol);
    76     void *visit(octal_integer_c *symbol);
    85     void *visit(octal_integer_c *symbol);
    77     void *visit(hex_integer_c *symbol);
    86     void *visit(hex_integer_c *symbol);
       
    87     void *visit(boolean_true_c *symbol);
       
    88     void *visit(boolean_false_c *symbol);
    78 
    89 
    79 
    90 
    80   /***********************************/
    91   /***********************************/
    81   /* B 1.3.1 - Elementary Data Types */
    92   /* B 1.3.1 - Elementary Data Types */
    82   /***********************************/
    93   /***********************************/
   100     void *visit(dword_type_name_c *symbol);
   111     void *visit(dword_type_name_c *symbol);
   101     void *visit(lword_type_name_c *symbol);
   112     void *visit(lword_type_name_c *symbol);
   102     void *visit(string_type_name_c *symbol);
   113     void *visit(string_type_name_c *symbol);
   103     void *visit(wstring_type_name_c *symbol);
   114     void *visit(wstring_type_name_c *symbol);
   104 
   115 
   105 /*
       
   106     void *visit(constant_int_type_name_c *symbol);
       
   107     void *visit(constant_real_type_name_c *symbol);
       
   108 */
       
   109 
       
   110     /******************************************************/
   116     /******************************************************/
   111     /* Extensions to the base standard as defined in      */
   117     /* Extensions to the base standard as defined in      */
   112     /* "Safety Software Technical Specification,          */
   118     /* "Safety Software Technical Specification,          */
   113     /*  Part 1: Concepts and Function Blocks,             */
   119     /*  Part 1: Concepts and Function Blocks,             */
   114     /*  Version 1.0 – Official Release"                   */
   120     /*  Version 1.0 – Official Release"                   */
   115     /* by PLCopen - Technical Committee 5 - 2006-01-31    */
   121     /* by PLCopen - Technical Committee 5 - 2006-01-31    */
   116     /******************************************************/
   122     /******************************************************/
       
   123     void *visit(safetime_type_name_c *symbol);
   117     void *visit(safebool_type_name_c *symbol);
   124     void *visit(safebool_type_name_c *symbol);
       
   125     void *visit(safesint_type_name_c *symbol);
       
   126     void *visit(safeint_type_name_c *symbol);
       
   127     void *visit(safedint_type_name_c *symbol);
       
   128     void *visit(safelint_type_name_c *symbol);
       
   129     void *visit(safeusint_type_name_c *symbol);
       
   130     void *visit(safeuint_type_name_c *symbol);
       
   131     void *visit(safeudint_type_name_c *symbol);
       
   132     void *visit(safeulint_type_name_c *symbol);
       
   133     void *visit(safereal_type_name_c *symbol);
       
   134     void *visit(safelreal_type_name_c *symbol);
       
   135     void *visit(safedate_type_name_c *symbol);
       
   136     void *visit(safetod_type_name_c *symbol);
       
   137     void *visit(safedt_type_name_c *symbol)	;
       
   138     void *visit(safebyte_type_name_c *symbol);
       
   139     void *visit(safeword_type_name_c *symbol);
       
   140     void *visit(safedword_type_name_c *symbol);
       
   141     void *visit(safelword_type_name_c *symbol);
       
   142     void *visit(safestring_type_name_c *symbol);
       
   143     void *visit(safewstring_type_name_c *symbol);
   118 
   144 
   119   /********************************/
   145   /********************************/
   120   /* B 1.3.3 - Derived data types */
   146   /* B 1.3.3 - Derived data types */
   121   /********************************/
   147   /********************************/
   122   /*  simple_type_name ':' simple_spec_init */
   148   /*  simple_type_name ':' simple_spec_init */