punctuator.hpp
Go to the documentation of this file.
1 // Copyright (C) 2020-2023 Jonathan Müller and lexy contributors
2 // SPDX-License-Identifier: BSL-1.0
3 
4 #ifndef LEXY_DSL_PUNCTUATOR_HPP_INCLUDED
5 #define LEXY_DSL_PUNCTUATOR_HPP_INCLUDED
6 
7 #include <lexy/dsl/base.hpp>
8 #include <lexy/dsl/literal.hpp>
9 
10 namespace lexyd
11 {
12 #define LEXY_PUNCT(Name, String) \
13  struct _##Name : LEXY_NTTP_STRING(_lit, String) \
14  {}; \
15  inline constexpr auto(Name) = _##Name {}
16 
17 LEXY_PUNCT(period, ".");
18 LEXY_PUNCT(comma, ",");
19 LEXY_PUNCT(colon, ":");
20 LEXY_PUNCT(double_colon, "::");
21 LEXY_PUNCT(semicolon, ";");
22 
23 LEXY_PUNCT(exclamation_mark, "!");
24 LEXY_PUNCT(question_mark, "?");
25 
26 LEXY_PUNCT(hyphen, "-");
27 LEXY_PUNCT(slash, "/");
28 LEXY_PUNCT(backslash, "\\");
29 LEXY_PUNCT(apostrophe, "'");
30 LEXY_PUNCT(ampersand, "&");
31 LEXY_PUNCT(caret, "^");
32 LEXY_PUNCT(asterisk, "*");
33 LEXY_PUNCT(tilde, "~");
34 LEXY_PUNCT(vbar, "|");
35 
36 LEXY_PUNCT(hash_sign, "#");
37 LEXY_PUNCT(dollar_sign, "$");
38 LEXY_PUNCT(at_sign, "@");
39 LEXY_PUNCT(percent_sign, "%");
40 LEXY_PUNCT(equal_sign, "=");
41 
42 #undef LEXY_PUNCT
43 } // namespace lexyd
44 
45 #endif // LEXY_DSL_PUNCTUATOR_HPP_INCLUDED
46 
literal.hpp
lexyd::LEXY_PUNCT
LEXY_PUNCT(period, ".")
base.hpp
lexyd
Definition: trace.hpp:22


behaviortree_cpp_v4
Author(s): Davide Faconti
autogenerated on Tue Jun 25 2024 02:20:36