Stan
2.5.0
probability, sampling & optimization
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
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[
"/*"
]
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
stan::gm::whitespace_grammar::whitespace
boost::spirit::qi::rule< Iterator > whitespace
Definition:
whitespace_grammar.hpp:16
stan::gm::whitespace_grammar
Definition:
whitespace_grammar.hpp:11
whitespace_grammar.hpp
stan::gm::whitespace_grammar::whitespace_grammar
whitespace_grammar()
Definition:
whitespace_grammar_def.hpp:13
[
Stan Home Page
]
© 2011–2014, Stan Development Team.