*/
#include <iostream>
+#include <stdexcept>
#include "ex.h"
#include "add.h"
#include "numeric.h"
#include "power.h"
#include "relational.h"
+#include "input_lexer.h"
#include "debugmsg.h"
#include "utils.h"
construct_from_double(d);
}
+ex::ex(const string &s, const ex &l)
+{
+ debugmsg("ex constructor from string,lst",LOGLEVEL_CONSTRUCT);
+ construct_from_string_and_lst(s, l);
+}
+
#endif // ndef INLINE_EX_CONSTRUCTORS
//////////
GINAC_ASSERT((bp->flags) & status_flags::dynallocated);
GINAC_ASSERT(bp->refcount=1);
}
+
+void ex::construct_from_string_and_lst(const string &s, const ex &l)
+{
+ set_lexer_string(s);
+ set_lexer_symbols(l);
+ ginac_yyrestart(NULL);
+ if (ginac_yyparse())
+ throw (std::runtime_error(get_parser_error()));
+ else {
+ bp = parsed_ex.bp;
+ GINAC_ASSERT(bp!=0);
+ GINAC_ASSERT((bp->flags) & status_flags::dynallocated);
+ ++bp->refcount;
+ }
+}
//////////
// static member variables