aas-core3 1.0.1
Manipulate, verify and de/serialize asset administration shells in C++.
Loading...
Searching...
No Matches
revm.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2023 aas-core3.0-cpp AUTHORS
2//
3// SPDX-License-Identifier: MIT
4
5#ifndef AAS_CORE_AAS_3_0_REVM_GUARD_
6#define AAS_CORE_AAS_3_0_REVM_GUARD_
7
8// This code has been automatically generated by aas-core-codegen.
9// Do NOT edit or append.
10
11#pragma warning(push, 0)
12#include <cstdint>
13#include <memory>
14#include <string>
15#include <vector>
16#pragma warning(pop)
17
18namespace aas_core {
19namespace aas_3_0 {
20
40namespace revm {
41
52
57 // NOTE (mristin):
58 // We avoid RTTI for performance reasons, and use our own enumerator instead.
59 virtual InstructionKind kind() const = 0;
60
61 virtual ~Instruction() = default;
62};
63
72 wchar_t character;
73
74 explicit InstructionChar(wchar_t a_character);
75 InstructionKind kind() const override;
76 ~InstructionChar() override = default;
77};
78
79std::string to_string(const InstructionChar& instruction);
80
84struct Range {
85 wchar_t first;
86 wchar_t last;
87
88 Range(wchar_t a_first, wchar_t a_last);
89};
90
91std::string to_string(const Range& range);
92
99 const std::vector<Range>& ranges,
100 wchar_t character
101);
102
111 std::vector<Range> ranges;
112
113 explicit InstructionSet(std::vector<Range> a_ranges);
114 InstructionKind kind() const override;
115 ~InstructionSet() override = default;
116};
117
118std::string to_string(const InstructionSet& instruction);
119
128 std::vector<Range> ranges;
129
130 explicit InstructionNotSet(std::vector<Range> a_ranges);
131 InstructionKind kind() const override;
132 ~InstructionNotSet() override = default;
133};
134
135std::string to_string(const InstructionNotSet& instruction);
136
141 InstructionKind kind() const override;
142 ~InstructionAny() override = default;
143};
144
145std::string to_string(const InstructionAny&);
146
151 InstructionKind kind() const override;
152 ~InstructionMatch() override = default;
153};
154
155std::string to_string(const InstructionMatch&);
156
161 size_t target;
162
163 explicit InstructionJump(size_t a_target);
164 InstructionKind kind() const override;
165 ~InstructionJump() override = default;
166};
167
168std::string to_string(const InstructionJump& instruction);
169
177
178 explicit InstructionSplit(size_t a_first_target, size_t a_second_target);
179 InstructionKind kind() const override;
180 ~InstructionSplit() override = default;
181};
182
183std::string to_string(const InstructionSplit& instruction);
184
189 InstructionKind kind() const override;
190 ~InstructionEnd() override = default;
191};
192
193std::string to_string(const InstructionEnd&);
194
195std::string to_string(const Instruction& instruction);
196
197std::string to_string(
198 const std::vector<std::unique_ptr<Instruction> >& instructions
199);
200
205bool Match(
206 const std::vector<std::unique_ptr<Instruction> >& program,
207 const std::wstring& text
208);
209
210} // namespace revm
211
212
213} // namespace aas_3_0
214} // namespace aas_core
215
216// This code has been automatically generated by aas-core-codegen.
217// Do NOT edit or append.
218
219#endif // AAS_CORE_AAS_3_0_REVM_GUARD_
Definition revm.hpp:40
bool Match(const std::vector< std::unique_ptr< Instruction > > &program, const std::wstring &text)
bool CharacterInRanges(const std::vector< Range > &ranges, wchar_t character)
InstructionKind
Definition revm.hpp:42
std::string to_string(const InstructionChar &instruction)
Definition common.hpp:51
Definition common.hpp:50
InstructionKind kind() const override
wchar_t character
Definition revm.hpp:72
InstructionKind kind() const override
InstructionKind kind() const override
size_t target
Definition revm.hpp:161
InstructionKind kind() const override
InstructionKind kind() const override
std::vector< Range > ranges
Definition revm.hpp:128
InstructionNotSet(std::vector< Range > a_ranges)
InstructionKind kind() const override
std::vector< Range > ranges
Definition revm.hpp:111
InstructionSet(std::vector< Range > a_ranges)
InstructionKind kind() const override
size_t first_target
Definition revm.hpp:175
InstructionSplit(size_t a_first_target, size_t a_second_target)
size_t second_target
Definition revm.hpp:176
InstructionKind kind() const override
virtual InstructionKind kind() const =0
Definition revm.hpp:84
Range(wchar_t a_first, wchar_t a_last)
wchar_t first
Definition revm.hpp:85
wchar_t last
Definition revm.hpp:86