1
2
3
4
5
6 #ifndef SNGCPP_SYMBOLS_GRAMMAR_SYMBOL_INCLUDED
7 #define SNGCPP_SYMBOLS_GRAMMAR_SYMBOL_INCLUDED
8 #include <sngcpp/symbols/ContainerSymbol.hpp>
9 #include <sngcpp/symbols/RuleSymbol.hpp>
10
11 namespace sngcpp { namespace symbols {
12
13 class GrammarSymbol : public ContainerSymbol
14 {
15 public:
16 GrammarSymbol(const Span& span_, const std::u32string& name_);
17 void AddMember(std::std::unique_ptr<Symbol>&&member) override;
18 std::u32string KindStr() override;
19 std::unique_ptr<sngxml::dom::Element> CreateElement() override;
20 bool IsGrammarSymbol() const override { return true; }
21 private:
22 std::vector<RuleSymbol*> rules;
23 };
24
25 } }
26
27 #endif // SNGCPP_SYMBOLS_GRAMMAR_SYMBOL_INCLUDED