1 /*=============================================================================
2 Copyright (c) 2001-2011 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_MINIC_FUNCTION_HPP)
8 #define BOOST_SPIRIT_MINIC_FUNCTION_HPP
10 #include "statement.hpp"
12 namespace client { namespace parser
14 ///////////////////////////////////////////////////////////////////////////////
15 // The function grammar
16 ///////////////////////////////////////////////////////////////////////////////
17 template <typename Iterator>
18 struct function : qi::grammar<Iterator, ast::function(), skipper<Iterator> >
20 function(error_handler<Iterator>& error_handler);
22 statement<Iterator> body;
23 qi::rule<Iterator, std::string(), skipper<Iterator> > name;
24 qi::rule<Iterator, ast::identifier(), skipper<Iterator> > identifier;
25 qi::rule<Iterator, std::list<ast::identifier>(), skipper<Iterator> > argument_list;
26 qi::rule<Iterator, ast::function(), skipper<Iterator> > start;