8 #ifndef LPPARSER_DRIVER_H
9 #define LPPARSER_DRIVER_H
25 using std::ostringstream;
57 const string& sname =
"stream input");
65 const string& sname =
"string stream");
80 void error(
const class location& l,
const string& m);
84 void error(
const string& m);
96 void obj_cbk(
bool minimize,
TermArray const& terms);
98 void constraint_cbk(
TermArray& terms,
char compare,
double constant);
100 void constraint_cbk(
string const& name,
TermArray& terms,
char compare,
double constant);
102 void bound_cbk(
string const& var,
char compare,
double constant);
104 void bound_cbk(
double constant,
char compare,
string const& var);
106 void bound_cbk(
double constant1,
char compare1,
string const& var,
char compare2,
double constant2);
123 #endif // EXAMPLE_DRIVER_H
Base class for lp database. Only pure virtual functions are defined. User needs to inheritate this cl...
bool trace_scanning
enable debug output in the flex scanner
bool parse_file(const string &filename)
std::vector< Term > TermArray
array of terms
string streamname
stream name (file or input stream) used for error messages.
std::vector< std::string > StringArray
string array
bool parse_stream(std::istream &in, const string &sname="stream input")
void error(const class location &l, const string &m)
bool parse_string(const string &input, const string &sname="string stream")
bool trace_parsing
enable debug output in the bison parser
bool read(LpDataBase &db, const string &lpFile)
API for LpParser. Read LP file and initialize database by calling user-defined callback functions...