Stan  2.5.0
probability, sampling & optimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
whitespace_grammar_def.hpp
Go to the documentation of this file.
1 #ifndef STAN__GM__PARSER__WHITESPACE_GRAMMAR_DEF__HPP
2 #define STAN__GM__PARSER__WHITESPACE_GRAMMAR_DEF__HPP
3 
4 #include <boost/spirit/include/qi.hpp>
5 
7 
8 namespace stan {
9 
10  namespace gm {
11 
12  template <typename Iterator>
14  : whitespace_grammar::base_type(whitespace)
15  {
16  using boost::spirit::qi::omit;
17  using boost::spirit::qi::char_;
18  using boost::spirit::qi::eol;
19  whitespace
20  = ( ( omit["/*"]
21  >> *(char_ - "*/") )
22  > omit["*/"] )
23  | ( omit["//"] >> *(char_ - eol) )
24  | ( omit["#"] >> *(char_ - eol) )
25  | boost::spirit::ascii::space_type()
26  ;
27  }
28 
29  }
30 
31 }
32 
33 
34 
35 #endif
boost::spirit::qi::rule< Iterator > whitespace

     [ Stan Home Page ] © 2011–2014, Stan Development Team.