00001 /* --------------------------------------------------------------------------- 00002 00003 00004 This file is part of the ``parser'' package of NuSMV version 2. 00005 Copyright (C) 1998-2001 by CMU and FBK-irst. 00006 00007 NuSMV version 2 is free software; you can redistribute it and/or 00008 modify it under the terms of the GNU Lesser General Public 00009 License as published by the Free Software Foundation; either 00010 version 2 of the License, or (at your option) any later version. 00011 00012 NuSMV version 2 is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 Lesser General Public License for more details. 00016 00017 You should have received a copy of the GNU Lesser General Public 00018 License along with this library; if not, write to the Free Software 00019 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. 00020 00021 For more information on NuSMV see <http://nusmv.fbk.eu> 00022 or email to <nusmv-users@fbk.eu>. 00023 Please report bugs to <nusmv-users@fbk.eu>. 00024 00025 To contact the NuSMV development board, email to <nusmv@fbk.eu>. 00026 00027 -----------------------------------------------------------------------------*/ 00028 00038 #ifndef __NUSMV_CORE_PARSER_PARSER_INT_H__ 00039 #define __NUSMV_CORE_PARSER_PARSER_INT_H__ 00040 00041 #include <stdlib.h> 00042 #include <stdio.h> 00043 00044 #include "nusmv/core/parser/parser.h" 00045 #include "cudd/util.h" 00046 00047 #include "nusmv/core/utils/utils.h" 00048 #include "nusmv/core/node/node.h" 00049 #include "nusmv/core/dd/dd.h" 00050 #include "nusmv/core/set/set.h" 00051 #include "nusmv/core/rbc/rbc.h" 00052 #include "nusmv/core/compile/compile.h" 00053 #include "nusmv/core/opt/opt.h" 00054 00055 /*---------------------------------------------------------------------------*/ 00056 /* Type declarations */ 00057 /*---------------------------------------------------------------------------*/ 00058 00065 typedef struct yy_buffer_state* YY_BUFFER_STATE; 00066 00067 00068 /*---------------------------------------------------------------------------*/ 00069 /* Constants declarations */ 00070 /*---------------------------------------------------------------------------*/ 00071 00072 /*---------------------------------------------------------------------------*/ 00073 /* Variable declarations */ 00074 /*---------------------------------------------------------------------------*/ 00075 extern node_ptr parsed_tree; 00076 00077 enum PARSE_MODE { PARSE_MODULES, PARSE_COMMAND, PARSE_LTL_EXPR }; 00078 extern enum PARSE_MODE parse_mode_flag; 00079 00080 extern int nusmv_yylineno; 00081 extern FILE *nusmv_yyin; 00082 00083 extern int psl_yylineno; 00084 extern FILE *psl_yyin; 00085 00086 extern cmp_struct_ptr cmps; 00087 00088 00089 extern node_ptr psl_parsed_tree; 00090 extern node_ptr psl_property_name; 00091 00092 /*---------------------------------------------------------------------------*/ 00093 /* Function prototypes */ 00094 /*---------------------------------------------------------------------------*/ 00095 00101 int nusmv_yylex(void); 00102 00108 int nusmv_yyparse(void); 00109 00115 void nusmv_yyrestart(FILE *input_file); 00116 00122 void nusmv_yy_switch_to_buffer(YY_BUFFER_STATE new_buffer); 00123 00129 YY_BUFFER_STATE nusmv_yy_scan_buffer(char *base, size_t size); 00130 00136 YY_BUFFER_STATE nusmv_yy_create_buffer(FILE *file, int size); 00137 00143 void nusmv_yy_delete_buffer(YY_BUFFER_STATE b); 00144 00150 YY_BUFFER_STATE nusmv_yy_scan_string(const char *yy_str); 00151 00157 void parser_add_syntax_error(const NuSMVEnv_ptr env, 00158 const char* fname, int lineno, 00159 const char* token, 00160 const char* err_msg); 00161 00168 void parser_free_parsed_syntax_errors(const NuSMVEnv_ptr env); 00169 00170 /* psl */ 00171 00177 void Parser_switch_to_psl(void); 00178 00179 #endif /* __NUSMV_CORE_PARSER_PARSER_INT_H__ */