Stan
1.0
probability, sampling & optimization
src
stan
gm
grammars
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
6
#include <
stan/gm/grammars/whitespace_grammar.hpp
>
7
8
namespace
stan
{
9
10
namespace
gm {
11
12
template
<
typename
Iterator>
13
whitespace_grammar<Iterator>::whitespace_grammar
()
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
stan
Probability, optimization and sampling library.
Definition:
agrad.cpp:6
stan::gm::whitespace_grammar
Definition:
whitespace_grammar.hpp:12
stan::gm::whitespace_grammar::whitespace
boost::spirit::qi::rule< Iterator > whitespace
Definition:
whitespace_grammar.hpp:16
stan::gm::whitespace_grammar::whitespace_grammar
whitespace_grammar()
Definition:
whitespace_grammar_def.hpp:13
whitespace_grammar.hpp
[
Stan Home Page
]
© 2011–2012, Stan Development Team.