Ert/lib/include/ert/util/Parser.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2011 Equinor ASA, Norway.
3
4 The file 'parser.h' is part of ERT - Ensemble based Reservoir Tool.
5
6 ERT is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 ERT is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE.
14
15 See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
16 for more details.
17*/
18
19#ifndef ERT_PARSER_H
20#define ERT_PARSER_H
22
23#ifdef __cplusplus
24extern "C" {
25#endif // __cplusplus
26
27typedef struct basic_parser_struct basic_parser_type;
28
29
126 const char * whitespace,
127 const char * quoters,
128 const char * specials,
129 const char * delete_set,
130 const char * comment_start,
131 const char * comment_end);
134void basic_parser_set_splitters( basic_parser_type * parser , const char * splitters );
135void basic_parser_set_quoters( basic_parser_type * parser , const char * quoters );
136void basic_parser_set_specials( basic_parser_type * parser , const char * specials );
137void basic_parser_set_delete_set( basic_parser_type * parser , const char * delete_set );
138void basic_parser_set_comment_start( basic_parser_type * parser , const char * comment_start );
139void basic_parser_set_comment_end( basic_parser_type * parser , const char * comment_end );
140
141
143 basic_parser_type * parser);
144
145
147 const basic_parser_type * parser,
148 const char * buffer,
149 bool strip_quote_marks);
150
151
153 const basic_parser_type * parser,
154 const char * filename,
155 bool strip_quote_marks);
156
157
158/* Pollution by Joakim: */
159
160void basic_parser_strip_buffer(const basic_parser_type * parser , char ** __buffer);
161bool basic_parser_fseek_string(const basic_parser_type * parser , FILE * stream , const char * string , bool skip_string , bool case_sensitive);
162char * basic_parser_fread_alloc_file_content(const char * filename , const char * quote_set , const char * delete_set , const char * comment_start , const char * comment_end);
163#ifdef __cplusplus
164}
165#endif // __cplusplus
166
167#endif
168
void basic_parser_set_comment_start(basic_parser_type *parser, const char *comment_start)
bool basic_parser_fseek_string(const basic_parser_type *parser, FILE *stream, const char *string, bool skip_string, bool case_sensitive)
char * basic_parser_fread_alloc_file_content(const char *filename, const char *quote_set, const char *delete_set, const char *comment_start, const char *comment_end)
void basic_parser_set_splitters(basic_parser_type *parser, const char *splitters)
void basic_parser_set_quoters(basic_parser_type *parser, const char *quoters)
void basic_parser_set_delete_set(basic_parser_type *parser, const char *delete_set)
void basic_parser_free(basic_parser_type *parser)
stringlist_type * basic_parser_tokenize_buffer(const basic_parser_type *parser, const char *buffer, bool strip_quote_marks)
stringlist_type * basic_parser_tokenize_file(const basic_parser_type *parser, const char *filename, bool strip_quote_marks)
void basic_parser_set_specials(basic_parser_type *parser, const char *specials)
basic_parser_type * basic_parser_alloc(const char *whitespace, const char *quoters, const char *specials, const char *delete_set, const char *comment_start, const char *comment_end)
void basic_parser_set_comment_end(basic_parser_type *parser, const char *comment_end)
void basic_parser_strip_buffer(const basic_parser_type *parser, char **__buffer)
struct basic_parser_struct basic_parser_type
Definition: Ert/lib/include/ert/util/Parser.hpp:27
const cJSON *const const cJSON_bool case_sensitive
Definition: cJSON.h:251
char * buffer
Definition: cJSON.h:161
struct stringlist_struct stringlist_type
Definition: stringlist.hpp:34