eis/mix_cc/matheval/parser.hpp

32 lines
497 B
C++
Raw Normal View History

#ifndef MATHEVAL_IMPLEMENTATION
#error "Do not include parser.hpp directly!"
#endif
#pragma once
#include "ast.hpp"
#include <boost/spirit/home/x3.hpp>
namespace mix_cc {
namespace matheval {
namespace x3 = boost::spirit::x3;
namespace parser {
struct expression_class;
using expression_type = x3::rule<expression_class, ast::expression>;
BOOST_SPIRIT_DECLARE(expression_type)
} // namespace parser
parser::expression_type grammar();
} // namespace matheval
} // namespace mix_cc