1 /*=============================================================================
2 Copyright (c) 2002-2018 Joel de Guzman
4 Distributed under the Boost Software License, Version 1.0. (See accompanying
5 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 =============================================================================*/
7 #if !defined(BOOST_SPIRIT_X3_MINIMAL_EMPLOYEE_DEF_HPP)
8 #define BOOST_SPIRIT_X3_MINIMAL_EMPLOYEE_DEF_HPP
10 #include <boost/config/warning_disable.hpp>
11 #include <boost/spirit/home/x3.hpp>
14 #include "ast_adapted.hpp"
15 #include "employee.hpp"
19 ///////////////////////////////////////////////////////////////////////////////
20 // Our employee parser definition
21 ///////////////////////////////////////////////////////////////////////////////
24 namespace x3 = boost::spirit::x3;
25 namespace ascii = boost::spirit::x3::ascii;
33 x3::rule<class employee, ast::employee> const employee = "employee";
35 auto const quoted_string = lexeme['"' >> +(char_ - '"') >> '"'];
37 auto const employee_def =
41 >> quoted_string >> ','
42 >> quoted_string >> ','
47 BOOST_SPIRIT_DEFINE(employee);
50 parser::employee_type employee()
52 return parser::employee;