mario@177: /* msousa@264: * matiec - a compiler for the programming languages defined in IEC 61131-3 mario@177: * msousa@264: * Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt) Edouard@279: * Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant mario@177: * msousa@264: * This program is free software: you can redistribute it and/or modify msousa@264: * it under the terms of the GNU General Public License as published by msousa@264: * the Free Software Foundation, either version 3 of the License, or msousa@264: * (at your option) any later version. msousa@264: * msousa@264: * This program is distributed in the hope that it will be useful, msousa@264: * but WITHOUT ANY WARRANTY; without even the implied warranty of msousa@264: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the msousa@264: * GNU General Public License for more details. msousa@264: * msousa@264: * You should have received a copy of the GNU General Public License msousa@264: * along with this program. If not, see . msousa@264: * mario@177: * mario@177: * This code is made available on the understanding that it will not be mario@177: * used in safety-critical situations without a full and competent review. mario@177: */ mario@177: mario@177: /* msousa@264: * An IEC 61131-3 compiler. mario@177: * mario@177: * Based on the mario@177: * FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10) mario@177: * mario@177: */ mario@177: mario@177: mario@177: /* mario@177: * The public interface to stage1_2.cc mario@177: */ mario@177: mario@177: mario@177: mario@177: #ifndef _STAGE1_2_HH mario@177: #define _STAGE1_2_HH mario@177: mario@177: mario@177: mario@177: /* mario@177: * This file includes the interface through which the main function accesses the stage1_2 services mario@177: */ mario@177: mario@177: mario@177: mario@177: typedef struct { mario@177: /******************************************************/ mario@177: /* whether we are suporting safe extensions */ mario@177: /* as defined in PLCopen - Technical Committee 5 */ mario@177: /* Safety Software Technical Specification, */ mario@177: /* Part 1: Concepts and Function Blocks, */ mario@177: /* Version 1.0 – Official Release */ mario@177: /******************************************************/ mario@177: bool safe_extensions; mjsousa@867: bool full_token_loc; /* error messages specify full token location */ mjsousa@867: bool conversion_functions; /* Create a conversion function for derived datatype */ mjsousa@867: bool nested_comments; /* Allow the use of nested comments. */ mjsousa@867: const char *includedir; /* Include directory, where included files will be searched for... */ mario@177: } stage1_2_options_t; mario@177: mario@177: mario@177: int stage1_2(const char *filename, symbol_c **tree_root, stage1_2_options_t options); mario@177: mario@177: mario@177: mario@177: mario@177: mario@177: #endif /* _STAGE1_2_HH */