Aprepro 5.0x

aprepro.h
Go to the documentation of this file.
1 // Copyright (c) 2014-2017 National Technology & Engineering Solutions
2 // of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
3 // NTESS, the U.S. Government retains certain rights in this software.
4 //
5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are
7 // met:
8 //
9 // * Redistributions of source code must retain the above copyright
10 // notice, this list of conditions and the following disclaimer.
11 //
12 // * Redistributions in binary form must reproduce the above
13 // copyright notice, this list of conditions and the following
14 // disclaimer in the documentation and/or other materials provided
15 // with the distribution.
16 //
17 // * Neither the name of NTESS nor the names of its
18 // contributors may be used to endorse or promote products derived
19 // from this software without specific prior written permission.
20 //
21 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 //
33
34 // Might be good to add a callback function which would be called
35 // when there was output -- In LexerOutput for example. Default
36 // could be to just write to std::cout or to resultsOutput stringstream...
37
38 #ifndef SEAMS_DRIVER_H
39 #define SEAMS_DRIVER_H
40
41 #include <cstdlib>
42 #include <iostream>
43 #include <ostream>
44 #include <sstream>
45 #include <stack>
46 #include <string>
47 #include <vector>
48
49 #include <cmath>
50 #ifndef math_errhandling
51 #define math_errhandling MATH_ERRNO
52 #endif
53
54 #if defined(_MSC_VER)
55 #include <io.h>
56 #define isatty _isatty
57 #endif
58
59 /** The SEAMS namespace is used to encapsulate the three parser classes
60 * SEAMS::Parser, SEAMS::Scanner and SEAMS::Aprepro */
61 namespace SEAMS {
62
63 struct array
64 {
65 std::vector<double> data;
66 int rows{0};
67 int cols{0};
68
69 array(int r, int c) : rows(r), cols(c) { data.resize(r * c); }
70 array() = default;
71 ~array() = default;
72 };
73
74 struct symrec
75 {
76 std::string name;
77 std::string syntax;
78 std::string info;
79 int type;
80 bool isInternal;
81 struct value
82 {
83 double var{0};
84 double (*fnctptr)(){nullptr};
85 double (*fnctptr_d)(double){nullptr};
86 double (*fnctptr_c)(char *){nullptr};
87 double (*fnctptr_dc)(double, char *){nullptr};
88 double (*fnctptr_cd)(char *, double){nullptr};
89 double (*fnctptr_cc)(char *, char *){nullptr};
90 double (*fnctptr_dd)(double, double){nullptr};
91 double (*fnctptr_ddd)(double, double, double){nullptr};
92 double (*fnctptr_ccc)(char *, char *, char *){nullptr};
93 double (*fnctptr_ccd)(char *, char *, double){nullptr};
94 double (*fnctptr_dddd)(double, double, double, double){nullptr};
95 double (*fnctptr_ddddc)(double, double, double, double, char *){nullptr};
96 double (*fnctptr_dddddd)(double, double, double, double, double, double){nullptr};
97 double (*fnctptr_a)(const array *){nullptr};
98 std::string svar;
99 const char *(*strfnct)(){nullptr};
100 const char *(*strfnct_c)(char *){nullptr};
101 const char *(*strfnct_d)(double){nullptr};
102 const char *(*strfnct_a)(const array *){nullptr};
103 const char *(*strfnct_dd)(double, double){nullptr};
104 const char *(*strfnct_cc)(char *, char *){nullptr};
105 const char *(*strfnct_ccc)(char *, char *, char *){nullptr};
106 const char *(*strfnct_dcc)(double, char *, char *){nullptr};
107 const char *(*strfnct_dcccc)(double, char *, char *, char *, char *){nullptr};
108 array *avar{nullptr}; /* Array Variable */
109 array *(*arrfnct_c)(const char *){nullptr};
110 array *(*arrfnct_cc)(const char *, const char *){nullptr};
111 array *(*arrfnct_cd)(const char *, double){nullptr};
112 array *(*arrfnct_ddd)(double, double, double){nullptr};
113 array *(*arrfnct_dd)(double, double){nullptr};
114 array *(*arrfnct_d)(double){nullptr};
115 array *(*arrfnct_a)(const array *){nullptr};
116
117 value() = default;
118 } value;
119 symrec *next;
120
121 symrec(const char *my_name, int my_type, bool is_internal = false)
122 : name(my_name), syntax(my_name), info("UNDEFINED"), type(my_type), isInternal(is_internal),
123 next(nullptr)
124 {
125 value.var = 0;
126 }
127
128 symrec(const std::string &my_name, int my_type, bool is_internal = false)
129 : name(my_name), syntax(my_name), info("UNDEFINED"), type(my_type), isInternal(is_internal),
130 next(nullptr)
131 {
132 value.var = 0;
133 }
134 };
135
136 /* Global options */
137 struct aprepro_options
138 {
139 std::string include_path;
140 std::string include_file;
141 bool end_on_exit{false};
142 bool warning_msg{true};
143 bool info_msg{false};
144 bool debugging{false};
145 bool dumpvars{false};
146 bool interactive{false};
147 bool immutable{false};
148 bool trace_parsing{false}; // enable debug output in the bison parser
149 bool one_based_index{false};
150 bool keep_history{false}; // Flag to keep a history of Aprepro substitutions
151 aprepro_options() = default;
152 };
153
154 /* Structure for holding file names and line counters */
155 struct file_rec
156 {
157 std::string name{"STDIN"};
158 int lineno{0};
159 int loop_count{0};
160 bool tmp_file{false};
161
162 file_rec(const char *my_name, int line_num, bool is_temp, int loop_cnt)
163 : name(my_name), lineno(line_num), loop_count(loop_cnt), tmp_file(is_temp)
164 {
165 }
166 file_rec() = default;
167 };
168
169 /* Structure for holding aprepro substitution info */
170 struct history_data
171 {
172 std::string original;
173 std::string substitution;
174 std::streampos index; // Character index in the output where the substitution begins.
175 };
176
177 /** The Aprepro class brings together all components. It creates an instance of
178 * the Parser and Scanner classes and connects them. Then the input stream is
179 * fed into the scanner object and the parser gets it's token
180 * sequence. Furthermore the aprepro object is available in the grammar rules as
181 * a parameter. Therefore the aprepro class contains a reference to the
182 * structure into which the parsed data is saved. */
183 class Aprepro
184 {
185 public:
186 /// construct a new parser aprepro context
187 Aprepro();
188 ~Aprepro();
189
190 enum class SYMBOL_TYPE {
191 VARIABLE = 1,
192 STRING_VARIABLE = 2,
193 UNDEFINED_VARIABLE = 5,
194 FUNCTION = 3,
195 STRING_FUNCTION = 4,
196 ARRAY_FUNCTION = 6,
197 ARRAY_VARIABLE = 7,
198 IMMUTABLE_VARIABLE = 11,
199 IMMUTABLE_STRING_VARIABLE = 12
200 };
201
202 bool state_is_immutable() const { return stateImmutable; }
203
204 /** Return an std::ostringstream reference to get the results of
205 the parse_* call (* = stream, file, or string).
206 */
207 const std::ostringstream &parsing_results() const { return parsingResults; }
208 void clear_results();
209
210 /** Return string representation of current version of aprepro. */
211 std::string version() const;
212
213 /** Invoke the scanner and parser for a stream.
214 * @param in input stream
215 * @param in_name stream name for error messages
216 * @return true if successfully parsed
217 */
218 bool parse_stream(std::istream &in, const std::string &in_name = "stream input");
219
220 /** Invoke the scanner and parser on an input string.
221 * @param input input string
222 * @param sname stream name for error messages
223 * @return true if successfully parsed
224 */
225 bool parse_string(const std::string &input, const std::string &sname = "string stream");
226
227 /** Invoke the scanner and parser on a vector of strings.
228 * @param input vector of input strings
229 * @param sname stream name for error messages
230 * @return true if successfully parsed
231 */
232 bool parse_strings(const std::vector<std::string> &input, const std::string &sname);
233
234 /** Invoke the scanner and parser on an input string in an
235 * interactive manner.
236 * @param input input stringInput
237 * @return true if successfully parsed
238 */
239 bool parse_string_interactive(const std::string &input);
240
241 /** Get the string interactive flag, which indicates if we are in
242 * the middle of parsing a string in an interactive manner.
243 */
244 bool string_interactive() { return stringInteractive; }
245
246 /** Invoke the scanner and parser on a file. Use parse_stream with a
247 * std::ifstream if detection of file reading errors is required.
248 * @param filename input file name
249 * @return true if successfully parsed
250 */
251 bool parse_file(const std::string &filename);
252
253 void statistics(std::ostream *out = nullptr) const;
254
255 aprepro_options ap_options;
256 std::stack<file_rec> ap_file_list;
257
258 std::stack<std::ostream *> outputStream;
259
260 SEAMS::symrec *getsym(const char *sym_name) const;
261 SEAMS::symrec *getsym(const std::string &sym_name) const;
262 SEAMS::symrec *putsym(const std::string &sym_name, SYMBOL_TYPE sym_type, bool is_internal);
263
264 void add_variable(const std::string &sym_name, const std::string &sym_value,
265 bool immutable = false, bool internal = false);
266 void add_variable(const std::string &sym_name, double sym_value, bool immutable = false,
267 bool internal = false);
268 void add_variable(const std::string &sym_name, array *value);
269
270 std::vector<std::string> get_variable_names(bool doInternal = false);
271 void remove_variable(const std::string &sym_name);
272
273 int set_option(const std::string &option, const std::string &optional_value = std::string(""));
274
275 std::fstream *open_file(const std::string &file, const char *mode);
276 std::fstream *check_open_file(const std::string &file, const char *mode);
277
278 /** Pointer to the current lexer instance, this is used to connect the
279 * parser to the scanner. It is used in the yylex macro. */
280 class Scanner *lexer{nullptr};
281
282 /** Error handling. */
283 int get_error_count() const
284 {
285 return parseErrorCount;
286 } /** Return number of errors reported during parse */
287 void error(const std::string &msg, bool line_info = true, bool prefix = true) const;
288 void warning(const std::string &msg, bool line_info = true, bool prefix = true) const;
289 void info(const std::string &msg, bool line_info = false, bool prefix = true) const;
290
291 // The info stream. To only print out info messages if the -M option was
292 // specified, use info(...) instead.
293 std::ostream *infoStream{&std::cout};
294
295 void set_error_streams(std::ostream *c_error, std::ostream *c_warning, std::ostream *c_info);
296
297 void dumpsym(const char *type, bool doInternal) const;
298 void dumpsym(int type, bool doInternal) const;
299 void dumpsym(int type, const char *pre, bool doInternal) const;
300
301 private:
302 void init_table(const char *comment);
303 std::vector<symrec *> sym_table;
304 std::ostringstream parsingResults;
305
306 // Input stream used with parse_string_interactive
307 std::istringstream stringInput;
308
309 bool stringInteractive{false};
310 class Scanner *stringScanner{nullptr};
311
312 // For error handling
313 std::ostream *errorStream{&std::cerr};
314 std::ostream *warningStream{&std::cerr};
315
316 // For substitution history.
317 std::vector<history_data> history;
318
319 mutable int parseErrorCount{0};
320
321 public:
322 bool stateImmutable{false};
323
324 // Flag to do Aprepro substitutions within loops. Default value is true. If set to
325 // false, content within the loop will be treated as verbatim text.
326 bool doLoopSubstitution{true};
327
328 // Flag to do Aprepro substitutions when including a file. Default value is true.
329 // If set to false, content within the file will be treated as verbatim text that
330 // needs to be sent through Aprepro again later.
331 bool doIncludeSubstitution{true};
332
333 // Flag to inidicate whether Aprepro is in the middle of collecting lines for a
334 // loop.
335 bool isCollectingLoop{false};
336
337 // Record the substitution of the current Aprepro statement. This function will also
338 // reset the historyString and add an entry to the substitution map.
339 void add_history(const std::string &original, const std::string &substitution);
340
341 // Used to avoid undefined variable warnings in old ifdef/ifndef construct
342 mutable bool inIfdefGetvar{false};
343
344 const std::vector<history_data> &get_history();
345 void clear_history();
346 };
347
348 } // namespace SEAMS
349
350 #endif // SEAMS_DRIVER_H
SEAMS
Definition: apr_aprepro.cc:68
SEAMS::Aprepro::warning
void warning(const std::string &msg, bool line_info=true, bool prefix=true) const
Definition: apr_aprepro.cc:210
SEAMS::Aprepro::dumpsym
void dumpsym(const char *type, bool doInternal) const
Definition: apr_aprepro.cc:683
SEAMS::Aprepro::parsing_results
const std::ostringstream & parsing_results() const
Definition: aprepro.h:207
SEAMS::Aprepro::parse_stream
bool parse_stream(std::istream &in, const std::string &in_name="stream input")
Definition: apr_aprepro.cc:111
SEAMS::aprepro_options::one_based_index
bool one_based_index
Definition: aprepro.h:149
SEAMS::Aprepro::SYMBOL_TYPE::UNDEFINED_VARIABLE
SEAMS::aprepro_options::aprepro_options
aprepro_options()=default
SEAMS::array
Definition: aprepro.h:63
SEAMS::Aprepro::parseErrorCount
int parseErrorCount
Definition: aprepro.h:319
SEAMS::Aprepro::clear_history
void clear_history()
Definition: apr_aprepro.cc:873
SEAMS::Aprepro::error
void error(const std::string &msg, bool line_info=true, bool prefix=true) const
Definition: apr_aprepro.cc:184
SEAMS::file_rec::file_rec
file_rec()=default
SEAMS::Aprepro::stringScanner
class Scanner * stringScanner
Definition: aprepro.h:310
SEAMS::Aprepro::version
std::string version() const
Definition: apr_aprepro.cc:103
SEAMS::Aprepro::infoStream
std::ostream * infoStream
Definition: aprepro.h:293
SEAMS::Aprepro::add_history
void add_history(const std::string &original, const std::string &substitution)
Definition: apr_aprepro.cc:855
SEAMS::Aprepro::sym_table
std::vector< symrec * > sym_table
Definition: aprepro.h:303
SEAMS::aprepro_options::dumpvars
bool dumpvars
Definition: aprepro.h:145
SEAMS::file_rec
Definition: aprepro.h:155
SEAMS::Aprepro::outputStream
std::stack< std::ostream * > outputStream
Definition: aprepro.h:258
SEAMS::Aprepro::ap_file_list
std::stack< file_rec > ap_file_list
Definition: aprepro.h:256
SEAMS::Aprepro::info
void info(const std::string &msg, bool line_info=false, bool prefix=true) const
Definition: apr_aprepro.cc:240
SEAMS::symrec::value::fnctptr_c
double(* fnctptr_c)(char *)
Definition: aprepro.h:86
SEAMS::file_rec::loop_count
int loop_count
Definition: aprepro.h:159
SEAMS::symrec::value::fnctptr_cc
double(* fnctptr_cc)(char *, char *)
Definition: aprepro.h:89
SEAMS::symrec::isInternal
bool isInternal
Definition: aprepro.h:80
SEAMS::aprepro_options::debugging
bool debugging
Definition: aprepro.h:144
SEAMS::symrec::value
struct SEAMS::symrec::value value
SEAMS::Aprepro::lexer
class Scanner * lexer
Definition: aprepro.h:280
SEAMS::symrec
Definition: aprepro.h:74
SEAMS::symrec::value::fnctptr_dddd
double(* fnctptr_dddd)(double, double, double, double)
Definition: aprepro.h:94
SEAMS::Aprepro::clear_results
void clear_results()
Definition: apr_aprepro.cc:105
SEAMS::symrec::value::var
double var
Definition: aprepro.h:83
SEAMS::Aprepro::getsym
SEAMS::symrec * getsym(const char *sym_name) const
Definition: apr_aprepro.cc:670
SEAMS::aprepro_options::end_on_exit
bool end_on_exit
Definition: aprepro.h:141
SEAMS::symrec::type
int type
Definition: aprepro.h:79
SEAMS::aprepro_options::include_file
std::string include_file
Definition: aprepro.h:140
SEAMS::array::rows
int rows
Definition: aprepro.h:66
SEAMS::symrec::value::fnctptr_ccd
double(* fnctptr_ccd)(char *, char *, double)
Definition: aprepro.h:93
SEAMS::Aprepro::set_error_streams
void set_error_streams(std::ostream *c_error, std::ostream *c_warning, std::ostream *c_info)
Definition: apr_aprepro.cc:269
SEAMS::Aprepro::inIfdefGetvar
bool inIfdefGetvar
Definition: aprepro.h:342
SEAMS::Aprepro::SYMBOL_TYPE::VARIABLE
SEAMS::symrec::value::fnctptr_dd
double(* fnctptr_dd)(double, double)
Definition: aprepro.h:90
SEAMS::symrec::value::fnctptr_ccc
double(* fnctptr_ccc)(char *, char *, char *)
Definition: aprepro.h:92
SEAMS::Aprepro::SYMBOL_TYPE::STRING_VARIABLE
SEAMS::symrec::value::fnctptr_cd
double(* fnctptr_cd)(char *, double)
Definition: aprepro.h:88
SEAMS::Aprepro::parse_string_interactive
bool parse_string_interactive(const std::string &input)
Definition: apr_aprepro.cc:154
SEAMS::aprepro_options
Definition: aprepro.h:137
SEAMS::Aprepro::SYMBOL_TYPE::IMMUTABLE_VARIABLE
SEAMS::Aprepro::stringInteractive
bool stringInteractive
Definition: aprepro.h:309
SEAMS::Aprepro::get_error_count
int get_error_count() const
Definition: aprepro.h:283
SEAMS::Aprepro::~Aprepro
~Aprepro()
Definition: apr_aprepro.cc:80
SEAMS::symrec::value::fnctptr
double(* fnctptr)()
Definition: aprepro.h:84
SEAMS::aprepro_options::immutable
bool immutable
Definition: aprepro.h:147
SEAMS::Aprepro::set_option
int set_option(const std::string &option, const std::string &optional_value=std::string(""))
Definition: apr_aprepro.cc:408
SEAMS::symrec::value::fnctptr_dc
double(* fnctptr_dc)(double, char *)
Definition: aprepro.h:87
SEAMS::symrec::symrec
symrec(const char *my_name, int my_type, bool is_internal=false)
Definition: aprepro.h:121
SEAMS::Aprepro::SYMBOL_TYPE::FUNCTION
SEAMS::Aprepro::SYMBOL_TYPE::STRING_FUNCTION
SEAMS::symrec::value
Definition: aprepro.h:81
SEAMS::file_rec::lineno
int lineno
Definition: aprepro.h:158
SEAMS::symrec::value::svar
std::string svar
Definition: aprepro.h:97
SEAMS::Aprepro::statistics
void statistics(std::ostream *out=nullptr) const
Definition: apr_aprepro.cc:800
SEAMS::Aprepro::open_file
std::fstream * open_file(const std::string &file, const char *mode)
Definition: apr_aprepro.cc:291
SEAMS::symrec::info
std::string info
Definition: aprepro.h:78
SEAMS::file_rec::tmp_file
bool tmp_file
Definition: aprepro.h:160
SEAMS::Aprepro::putsym
SEAMS::symrec * putsym(const std::string &sym_name, SYMBOL_TYPE sym_type, bool is_internal)
Definition: apr_aprepro.cc:345
SEAMS::aprepro_options::keep_history
bool keep_history
Definition: aprepro.h:150
SEAMS::Aprepro::errorStream
std::ostream * errorStream
Definition: aprepro.h:313
SEAMS::aprepro_options::interactive
bool interactive
Definition: aprepro.h:146
SEAMS::Aprepro::parse_string
bool parse_string(const std::string &input, const std::string &sname="string stream")
Definition: apr_aprepro.cc:139
SEAMS::Aprepro::history
std::vector< history_data > history
Definition: aprepro.h:317
SEAMS::Aprepro::SYMBOL_TYPE::ARRAY_FUNCTION
SEAMS::aprepro_options::include_path
std::string include_path
Definition: aprepro.h:139
SEAMS::Aprepro::isCollectingLoop
bool isCollectingLoop
Definition: aprepro.h:335
SEAMS::array::array
array(int r, int c)
Definition: aprepro.h:69
SEAMS::symrec::symrec
symrec(const std::string &my_name, int my_type, bool is_internal=false)
Definition: aprepro.h:128
SEAMS::anonymous_namespace{apr_units.cc}::comment
std::string & comment()
Definition: apr_units.cc:50
SEAMS::Aprepro::add_variable
void add_variable(const std::string &sym_name, const std::string &sym_value, bool immutable=false, bool internal=false)
Definition: apr_aprepro.cc:537
SEAMS::array::cols
int cols
Definition: aprepro.h:67
SEAMS::symrec::value::fnctptr_ddddc
double(* fnctptr_ddddc)(double, double, double, double, char *)
Definition: aprepro.h:95
SEAMS::Aprepro::state_is_immutable
bool state_is_immutable() const
Definition: aprepro.h:202
SEAMS::Aprepro::SYMBOL_TYPE::ARRAY_VARIABLE
SEAMS::history_data::index
std::streampos index
Definition: aprepro.h:174
SEAMS::aprepro_options::info_msg
bool info_msg
Definition: aprepro.h:143
SEAMS::aprepro_options::warning_msg
bool warning_msg
Definition: aprepro.h:142
SEAMS::symrec::syntax
std::string syntax
Definition: aprepro.h:77
SEAMS::Aprepro::parse_strings
bool parse_strings(const std::vector< std::string > &input, const std::string &sname)
Definition: apr_aprepro.cc:145
SEAMS::symrec::next
symrec * next
Definition: aprepro.h:119
SEAMS::Aprepro::parse_file
bool parse_file(const std::string &filename)
Definition: apr_aprepro.cc:130
SEAMS::Aprepro::stringInput
std::istringstream stringInput
Definition: aprepro.h:307
SEAMS::array::array
array()=default
SEAMS::Aprepro::ap_options
aprepro_options ap_options
Definition: aprepro.h:255
SEAMS::file_rec::file_rec
file_rec(const char *my_name, int line_num, bool is_temp, int loop_cnt)
Definition: aprepro.h:162
SEAMS::symrec::value::fnctptr_d
double(* fnctptr_d)(double)
Definition: aprepro.h:85
SEAMS::Aprepro::doLoopSubstitution
bool doLoopSubstitution
Definition: aprepro.h:326
SEAMS::history_data
Definition: aprepro.h:170
SEAMS::Aprepro::SYMBOL_TYPE::IMMUTABLE_STRING_VARIABLE
SEAMS::array::data
std::vector< double > data
Definition: aprepro.h:65
SEAMS::Aprepro::get_history
const std::vector< history_data > & get_history()
Definition: apr_aprepro.cc:871
SEAMS::Aprepro::check_open_file
std::fstream * check_open_file(const std::string &file, const char *mode)
Definition: apr_aprepro.cc:324
SEAMS::Aprepro::SYMBOL_TYPE
SYMBOL_TYPE
Definition: aprepro.h:190
SEAMS::symrec::name
std::string name
Definition: aprepro.h:76
SEAMS::Aprepro::parsingResults
std::ostringstream parsingResults
Definition: aprepro.h:304
SEAMS::Aprepro::doIncludeSubstitution
bool doIncludeSubstitution
Definition: aprepro.h:331
SEAMS::symrec::value::fnctptr_a
double(* fnctptr_a)(const array *)
Definition: aprepro.h:97
SEAMS::Aprepro::remove_variable
void remove_variable(const std::string &sym_name)
Definition: apr_aprepro.cc:624
SEAMS::aprepro_options::trace_parsing
bool trace_parsing
Definition: aprepro.h:148
SEAMS::Scanner
Definition: apr_scanner.h:27
SEAMS::symrec::value::fnctptr_dddddd
double(* fnctptr_dddddd)(double, double, double, double, double, double)
Definition: aprepro.h:96
SEAMS::Aprepro
Definition: aprepro.h:183
SEAMS::symrec::value::avar
array * avar
Definition: aprepro.h:108
SEAMS::Aprepro::get_variable_names
std::vector< std::string > get_variable_names(bool doInternal=false)
Definition: apr_aprepro.cc:594
SEAMS::Aprepro::warningStream
std::ostream * warningStream
Definition: aprepro.h:314
SEAMS::Aprepro::Aprepro
Aprepro()
construct a new parser aprepro context
Definition: apr_aprepro.cc:72
SEAMS::file_rec::name
std::string name
Definition: aprepro.h:157
SEAMS::Aprepro::string_interactive
bool string_interactive()
Definition: aprepro.h:244
SEAMS::Aprepro::stateImmutable
bool stateImmutable
Definition: aprepro.h:322
SEAMS::history_data::original
std::string original
Definition: aprepro.h:172
SEAMS::array::~array
~array()=default
SEAMS::history_data::substitution
std::string substitution
Definition: aprepro.h:173
SEAMS::symrec::value::fnctptr_ddd
double(* fnctptr_ddd)(double, double, double)
Definition: aprepro.h:91
SEAMS::Aprepro::init_table
void init_table(const char *comment)
Definition: apr_init.cc:396
SEAMS::symrec::value::value
value()=default