Skip to content

File keyword_grammar.hpp

File List > backends > cxx > include > zmbt > model > keyword_grammar.hpp

Go to the documentation of this file

#ifndef ZMBT_MODEL_EXPRESSION_GRAMMAR_HPP_
#define ZMBT_MODEL_EXPRESSION_GRAMMAR_HPP_

#include <boost/spirit/include/qi.hpp>
#include <boost/phoenix/operator.hpp>

#include "keyword.hpp"


namespace zmbt {
namespace dsl {

struct KeywordSymbol : public boost::spirit::qi::symbols<char, Keyword>
{
    KeywordSymbol();
};

struct KeywordGrammar : public boost::spirit::qi::grammar<boost::json::string::const_iterator, Keyword()>
{
    KeywordGrammar();

    KeywordSymbol keyword_symbol;
    boost::spirit::qi::rule<boost::json::string::const_iterator, Keyword()> start;
};

// Boost JSON conversion from Keyword
void tag_invoke(boost::json::value_from_tag const&, boost::json::value&, Keyword const& t);

// Boost JSON conversion to Keyword
Keyword tag_invoke(boost::json::value_to_tag<Keyword> const&, boost::json::value const&);


} // namespace dsl
} // namespace zmbt


#endif // ZMBT_MAPPING_EXPRESSION_HPP_