• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*=============================================================================
2     Copyright (c) 2001-2011 Joel de Guzman
3 
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_CONJURE_SKIPPER_HPP)
8 #define BOOST_SPIRIT_CONJURE_SKIPPER_HPP
9 
10 #include <boost/spirit/include/qi.hpp>
11 
12 namespace client { namespace parser
13 {
14     namespace qi = boost::spirit::qi;
15     namespace ascii = boost::spirit::ascii;
16 
17     ///////////////////////////////////////////////////////////////////////////////
18     //  The skipper grammar
19     ///////////////////////////////////////////////////////////////////////////////
20     template <typename Iterator>
21     struct skipper : qi::grammar<Iterator>
22     {
skipperclient::parser::skipper23         skipper() : skipper::base_type(start)
24         {
25             qi::char_type char_;
26             ascii::space_type space;
27 
28             start =
29                     space                               // tab/space/cr/lf
30                 |   "/*" >> *(char_ - "*/") >> "*/"     // C-style comments
31                 ;
32         }
33 
34         qi::rule<Iterator> start;
35     };
36 }}
37 
38 #endif
39 
40 
41