44 FILE*
const input = fopen(filename.c_str(),
"r");
45 if (
input ==
nullptr) {
46 LOG(INFO) <<
"Could not open file '" << filename <<
"'";
52 context.integer_map[
"false"] = 0;
54 void* scanner =
nullptr;
60 if (scanner !=
nullptr) {
72 context.integer_map[
"false"] = 0;
74 void* scanner =
nullptr;
81 if (string_buffer !=
nullptr) {
84 if (scanner !=
nullptr) {
GurobiMPCallbackContext * context
bool ParseFlatzincString(const std::string &input, Model *model)
bool ParseFlatzincFile(const std::string &filename, Model *model)
--— public parsing API --—
In SWIG mode, we don't want anything besides these top-level includes.
int orfz_lex_destroy(void *scanner)
int orfz_parse(operations_research::fz::ParserContext *parser, operations_research::fz::Model *model, bool *ok, void *scanner)
Declare external functions in the flatzinc.tab.cc generated file.
yy_buffer_state * orfz__scan_bytes(const char *input, int size, void *scanner)
int orfz_lex_init(void **scanner)
void orfz_set_in(FILE *in_str, void *yyscanner)
void orfz__delete_buffer(yy_buffer_state *b, void *scanner)
static int input(yyscan_t yyscanner)
This is the context used during parsing.
absl::flat_hash_map< std::string, int64_t > integer_map