stage1_2/stage1_2.hh
author laurent
Thu, 07 Jul 2011 10:49:08 +0200
changeset 335 96d2efda3d8d
parent 279 c0453b7f99df
child 746 c7219a37cc39
permissions -rwxr-xr-x
Fix makefiles when not using make as make tool
177
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
     1
/*
264
6facabd9c2cd Updating License info (with Edoaurd's permission for relevant files).
Mario de Sousa <msousa@fe.up.pt>
parents: 177
diff changeset
     2
 *  matiec - a compiler for the programming languages defined in IEC 61131-3
177
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
     3
 *
264
6facabd9c2cd Updating License info (with Edoaurd's permission for relevant files).
Mario de Sousa <msousa@fe.up.pt>
parents: 177
diff changeset
     4
 *  Copyright (C) 2003-2011  Mario de Sousa (msousa@fe.up.pt)
279
c0453b7f99df Re-generated std lib related code, with updated headers, updated all forgotten headers
Edouard Tisserant
parents: 264
diff changeset
     5
 *  Copyright (C) 2007-2011  Laurent Bessard and Edouard Tisserant
177
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
     6
 *
264
6facabd9c2cd Updating License info (with Edoaurd's permission for relevant files).
Mario de Sousa <msousa@fe.up.pt>
parents: 177
diff changeset
     7
 *  This program is free software: you can redistribute it and/or modify
6facabd9c2cd Updating License info (with Edoaurd's permission for relevant files).
Mario de Sousa <msousa@fe.up.pt>
parents: 177
diff changeset
     8
 *  it under the terms of the GNU General Public License as published by
6facabd9c2cd Updating License info (with Edoaurd's permission for relevant files).
Mario de Sousa <msousa@fe.up.pt>
parents: 177
diff changeset
     9
 *  the Free Software Foundation, either version 3 of the License, or
6facabd9c2cd Updating License info (with Edoaurd's permission for relevant files).
Mario de Sousa <msousa@fe.up.pt>
parents: 177
diff changeset
    10
 *  (at your option) any later version.
6facabd9c2cd Updating License info (with Edoaurd's permission for relevant files).
Mario de Sousa <msousa@fe.up.pt>
parents: 177
diff changeset
    11
 *
6facabd9c2cd Updating License info (with Edoaurd's permission for relevant files).
Mario de Sousa <msousa@fe.up.pt>
parents: 177
diff changeset
    12
 *  This program is distributed in the hope that it will be useful,
6facabd9c2cd Updating License info (with Edoaurd's permission for relevant files).
Mario de Sousa <msousa@fe.up.pt>
parents: 177
diff changeset
    13
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
6facabd9c2cd Updating License info (with Edoaurd's permission for relevant files).
Mario de Sousa <msousa@fe.up.pt>
parents: 177
diff changeset
    14
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6facabd9c2cd Updating License info (with Edoaurd's permission for relevant files).
Mario de Sousa <msousa@fe.up.pt>
parents: 177
diff changeset
    15
 *  GNU General Public License for more details.
6facabd9c2cd Updating License info (with Edoaurd's permission for relevant files).
Mario de Sousa <msousa@fe.up.pt>
parents: 177
diff changeset
    16
 *
6facabd9c2cd Updating License info (with Edoaurd's permission for relevant files).
Mario de Sousa <msousa@fe.up.pt>
parents: 177
diff changeset
    17
 *  You should have received a copy of the GNU General Public License
6facabd9c2cd Updating License info (with Edoaurd's permission for relevant files).
Mario de Sousa <msousa@fe.up.pt>
parents: 177
diff changeset
    18
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
6facabd9c2cd Updating License info (with Edoaurd's permission for relevant files).
Mario de Sousa <msousa@fe.up.pt>
parents: 177
diff changeset
    19
 *
177
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    20
 *
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    21
 * This code is made available on the understanding that it will not be
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    22
 * used in safety-critical situations without a full and competent review.
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    23
 */
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    24
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    25
/*
264
6facabd9c2cd Updating License info (with Edoaurd's permission for relevant files).
Mario de Sousa <msousa@fe.up.pt>
parents: 177
diff changeset
    26
 * An IEC 61131-3 compiler.
177
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    27
 *
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    28
 * Based on the
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    29
 * FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10)
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    30
 *
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    31
 */
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    32
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    33
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    34
/*
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    35
 * The public interface to stage1_2.cc 
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    36
 */
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    37
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    38
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    39
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    40
#ifndef _STAGE1_2_HH
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    41
#define _STAGE1_2_HH
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    42
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    43
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    44
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    45
/*
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    46
 * This file includes the interface through which the main function accesses the stage1_2 services 
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    47
 */
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    48
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    49
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    50
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    51
typedef struct {
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    52
		/******************************************************/
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    53
		/* whether we are suporting safe extensions           */
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    54
		/* as defined in PLCopen - Technical Committee 5      */
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    55
		/* Safety Software Technical Specification,           */
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    56
		/* Part 1: Concepts and Function Blocks,              */
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    57
		/* Version 1.0 – Official Release                     */
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    58
		/******************************************************/
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    59
	bool safe_extensions;
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    60
		/* error messages specify full token location */
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    61
	bool full_token_loc; 
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    62
		/* Include directory, where included files will be searched for... */
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    63
	const char *includedir;
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    64
} stage1_2_options_t;
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    65
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    66
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    67
int stage1_2(const char *filename, symbol_c **tree_root, stage1_2_options_t options);
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    68
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    69
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    70
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    71
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    72
697562a5da7c Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff changeset
    73
#endif   /* _STAGE1_2_HH */