Stan  1.0
probability, sampling & optimization
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["/*"] >> *(char_ - "*/") > omit["*/"] )
21  | ( omit["//"] >> *(char_ - eol) )
22  | ( omit["#"] >> *(char_ - eol) )
23  | boost::spirit::ascii::space_type()
24  ;
25  }
26 
27  }
28 
29 }
30 
31 
32 
33 #endif
Probability, optimization and sampling library.
Definition: agrad.cpp:6
boost::spirit::qi::rule< Iterator > whitespace

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