Stan  2.14.0
probability, sampling & optimization
statement_2_grammar.hpp
Go to the documentation of this file.
1 #ifndef STAN_LANG_GRAMMARS_STATEMENT_2_GRAMMAR_HPP
2 #define STAN_LANG_GRAMMARS_STATEMENT_2_GRAMMAR_HPP
3 
4 #include <stan/lang/ast.hpp>
8 #include <boost/spirit/include/qi.hpp>
9 #include <sstream>
10 
11 namespace stan {
12 
13  namespace lang {
14 
15  template <typename Iterator>
17 
18  // for _r1, _r2, _r3, _r4 doc, see statement_grammar_def.hpp
19  template <typename Iterator>
21  : boost::spirit::qi::grammar<Iterator,
22  statement(bool, var_origin, bool, bool),
23  whitespace_grammar<Iterator> > {
25  std::stringstream& error_msgs_;
28 
30  std::stringstream& error_msgs,
32 
33  boost::spirit::qi::rule<Iterator,
35  bool),
38 
39  boost::spirit::qi::rule<Iterator,
40  statement(bool, var_origin, bool, bool),
43  };
44 
45  }
46 }
47 #endif
Structure to wrap the variant type of statements.
Definition: statement.hpp:29
Probability, optimization and sampling library.
A map from function names to their base declarations and their origin.
boost::spirit::qi::rule< Iterator, statement(bool, var_origin, bool, bool), whitespace_grammar< Iterator > > statement_2_r
int var_origin
The type of a variable indicating where a variable was declared.
Definition: var_origin.hpp:12
statement_2_grammar(variable_map &var_map, std::stringstream &error_msgs, statement_grammar< Iterator > &sg)
statement_grammar< Iterator > & statement_g
expression_grammar< Iterator > expression_g
boost::spirit::qi::rule< Iterator, conditional_statement(bool, var_origin, bool, bool), whitespace_grammar< Iterator > > conditional_statement_r
AST node for conditional statements.

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