00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00040 #ifndef __NUSMV_CORE_PARSER_PARSER_H__
00041 #define __NUSMV_CORE_PARSER_PARSER_H__
00042
00043 #include "nusmv/core/utils/utils.h"
00044 #include "nusmv/core/node/node.h"
00045
00046
00047
00048
00049
00050
00056 #define OPT_PARSER_IS_LAX "parser_is_lax"
00057
00058
00059
00060
00061
00067 void Parser_Init(NuSMVEnv_ptr env);
00068
00074 void Parser_Quit(NuSMVEnv_ptr env);
00075
00081 int Parser_read_model(NuSMVEnv_ptr env,
00082 char* ifile);
00083
00092 int Parser_ReadCmdFromString(NuSMVEnv_ptr env, int argc, const char** argv,
00093 const char* head, const char* tail,
00094 node_ptr* pc);
00095
00102 int Parser_ReadSimpExprFromString(NuSMVEnv_ptr env, const char* str_expr,
00103 node_ptr* res);
00104
00111 int Parser_ReadCmdFromFile(NuSMVEnv_ptr env, const char *filename,
00112 node_ptr* res);
00113
00122 int Parser_ReadSMVFromFile(NuSMVEnv_ptr env, const char* filename);
00123
00132 int Parser_ReadLtlExprFromFile(NuSMVEnv_ptr env, const char* filename);
00133
00140 int Parser_read_psl_from_string(const NuSMVEnv_ptr env,
00141 int argc, const char** argv,
00142 node_ptr* res);
00143
00150 int Parser_read_psl_from_file(const NuSMVEnv_ptr env,
00151 const char* filename, node_ptr* res);
00152
00159 int
00160 Parser_ReadNextExprFromString(NuSMVEnv_ptr env, const char* str_expr, node_ptr* res);
00161
00172 int Parser_ReadTypeFromString(NuSMVEnv_ptr env,
00173 const char* str_type,
00174 node_ptr* res);
00175
00182 int
00183 Parser_ReadIdentifierExprFromString(NuSMVEnv_ptr env, const char* str_expr, node_ptr* res);
00184
00191 int
00192 Parser_ReadNextExprFromFile(NuSMVEnv_ptr env, const char *filename, node_ptr* res);
00193
00203 node_ptr Parser_get_syntax_errors_list(const NuSMVEnv_ptr env);
00204
00216 void Parser_get_syntax_error(node_ptr node,
00217 const char** out_filename,
00218 int* out_lineno,
00219 const char** out_token,
00220 const char** out_message);
00221
00231 void Parser_print_syntax_error(node_ptr error, FILE* fout);
00232
00238 void Parser_OpenInput(const NuSMVEnv_ptr env, const char *filename);
00239
00250 void Parser_CloseInput(void);
00251
00257 void Parser_switch_to_smv(void);
00258
00264 int Parser_skip_multiline_comment(int (*read_function)(void));
00265
00271 int Parser_skip_one_line_comment(int (*read_function)(void));
00272
00273 #endif