mupp 1.1.0
Loading...
Searching...
No Matches
PStatement.hpp
Go to the documentation of this file.
1/***************************************************************************
2
3 PStatement.hpp
4
5 Author: Andreas Suter
6 e-mail: andreas.suter@psi.ch
7
8 Based on Joel de Guzman example on calc7,
9 see https://github.com/boostorg/spirit
10
11***************************************************************************/
12
13/***************************************************************************
14 * Copyright (C) 2023 by Andreas Suter *
15 * andreas.suter@psi.ch *
16 * *
17 * This program is free software; you can redistribute it and/or modify *
18 * it under the terms of the GNU General Public License as published by *
19 * the Free Software Foundation; either version 2 of the License, or *
20 * (at your option) any later version. *
21 * *
22 * This program is distributed in the hope that it will be useful, *
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
25 * GNU General Public License for more details. *
26 * *
27 * You should have received a copy of the GNU General Public License *
28 * along with this program; if not, write to the *
29 * Free Software Foundation, Inc., *
30 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
31 ***************************************************************************/
32
33#ifndef _PSTATEMENT_HPP_
34#define _PSTATEMENT_HPP_
35
36#include "PExpression.hpp"
37
38namespace mupp { namespace parser
39{
41
64
65 // Rule IDs
66 struct statement_list_class;
67 struct variable_declaration_class;
68 struct assignment_class;
69 struct stmt_identifier_class;
70
71 // Rule declarations
72 typedef x3::rule<statement_list_class, ast::statement_list> statement_list_type;
73 typedef x3::rule<variable_declaration_class, ast::variable_declaration> variable_declaration_type;
74 typedef x3::rule<assignment_class, ast::assignment> assignment_type;
75 typedef x3::rule<stmt_identifier_class, std::string> stmt_identifier_type;
76
79}}
80
81#endif // _PSTATEMENT_HPP_
82
83
x3::rule< stmt_identifier_class, std::string > stmt_identifier_type
x3::rule< assignment_class, ast::assignment > assignment_type
x3::rule< statement_list_class, ast::statement_list > statement_list_type
x3::rule< variable_declaration_class, ast::variable_declaration > variable_declaration_type