OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
ast_def.hpp
Go to the documentation of this file.
1//
2// Namespace ast
3//
4// Copyright (c) 2015, Christof Metzger-Kraus, Helmholtz-Zentrum Berlin
5// All rights reserved
6//
7// This file is part of OPAL.
8//
9// OPAL is free software: you can redistribute it and/or modify
10// it under the terms of the GNU General Public License as published by
11// the Free Software Foundation, either version 3 of the License, or
12// (at your option) any later version.
13//
14// You should have received a copy of the GNU General Public License
15// along with OPAL. If not, see <https://www.gnu.org/licenses/>.
16//
17#ifndef AST_DEF_HPP_
18#define AST_DEF_HPP_
19
20#include "ast.hpp"
21
22namespace SDDS { namespace parser
23{
24
25 template <typename Iterator, typename Skipper>
27 string::base_type(start)
28 {
29 qi::char_type char_;
30 qi::eol_type eol;
31 qi::lexeme_type lexeme;
32
33 start %= lexeme[+(char_-eol)];
34 }
35
36
37 template <typename Iterator, typename Skipper>
39 qstring::base_type(start)
40 {
41 qi::char_type char_;
42 qi::eol_type eol;
43 qi::lexeme_type lexeme;
44
45 start %= lexeme['"' >> +(char_ - (eol|'"')) >> '"']
46 | lexeme[+(char_ - (eol|' '))];
47 }
48}}
49
50#endif // AST_DEF_HPP_
boost::spirit::qi::rule< Iterator, std::string(), Skipper > start
Definition: ast.hpp:82
boost::spirit::qi::rule< Iterator, std::string(), Skipper > start
Definition: ast.hpp:90