this repo has no description
1/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 3/* 4 * Main authors: 5 * Jip J. Dekker <jip.dekker@monash.edu> 6 */ 7 8/* This Source Code Form is subject to the terms of the Mozilla Public 9 * License, v. 2.0. If a copy of the MPL was not distributed with this 10 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 11 12#ifndef __MINIZINC_MZA_PARSER_HH__ 13#define __MINIZINC_MZA_PARSER_HH__ 14 15// Assembly Parser Requirements 16#include <minizinc/interpreter.hh> 17 18#include <list> 19 20// This is a workaround for a bug in flex that only shows up 21// with the Microsoft C++ compiler 22#if defined(_MSC_VER) 23#define YY_NO_UNISTD_H 24#ifdef __cplusplus 25extern "C" int isatty(int); 26#endif 27#endif 28 29// The Microsoft C++ compiler marks certain functions as deprecated, 30// so let's take the alternative definitions 31#if defined(_MSC_VER) 32#define strdup _strdup 33#define fileno _fileno 34#endif 35 36// Anonymous struct for when yyparse is exported 37typedef struct MZAContext MZAContext; 38// Parser generated header 39#include <minizinc/support/mza_parser.tab.hh> 40 41using namespace MiniZinc; 42 43// Parsing function 44std::pair<int, std::vector<BytecodeProc>> parse_mza(const std::string& assembly_str); 45 46#endif //__MINIZINC_MZA_PARSER_HH__