formalang/include/regular/RegularTree.hpp

32 lines
505 B
C++
Raw Normal View History

2021-09-24 15:28:10 +00:00
#pragma once
#include <variant>
#include <vector>
#include <memory>
#include <string>
#include <string_view>
namespace regular {
class RegularTree {
public:
class Node {
public:
Node();
void Parse(const std::string&);
void Parse(const std::string_view);
enum class Type {
Addition, Concatenation
};
std::variant<std::vector<std::unique_ptr<Node>>, std::string> value;
Type type;
private:
};
RegularTree(const std::string&);
private:
Node node_;
};
}