Stan  2.10.0
probability, sampling & optimization
whitespace_grammar_def.hpp
Go to the documentation of this file.
1 #ifndef STAN_LANG_GRAMMARS_WHITESPACE_GRAMMAR_DEF_HPP
2 #define STAN_LANG_GRAMMARS_WHITESPACE_GRAMMAR_DEF_HPP
3 
5 #include <boost/spirit/include/qi.hpp>
6 
7 namespace stan {
8 
9  namespace lang {
10 
11  template <typename Iterator>
13  : whitespace_grammar::base_type(whitespace) {
14  using boost::spirit::qi::omit;
15  using boost::spirit::qi::char_;
16  using boost::spirit::qi::eol;
18  = ((omit["/*"]
19  >> *(char_ - "*/"))
20  > omit["*/"])
21  | (omit["//"] >> *(char_ - eol))
22  | (omit["#"] >> *(char_ - eol))
23  | boost::spirit::ascii::space_type();
24  }
25 
26  }
27 }
28 #endif
Probability, optimization and sampling library.
boost::spirit::qi::rule< Iterator > whitespace

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