1
2
3
4
5
6 #ifndef SNG2HTML_SNG2HTML_LINKER_VISITOR_INCLUDED
7 #define SNG2HTML_SNG2HTML_LINKER_VISITOR_INCLUDED
8 #include <sng2html/sng2html/Visitor.hpp>
9
10 namespace sng2html { namespace sng2html {
11
12 class Domain;
13
14 class LinkerVisitor : public Visitor
15 {
16 public:
17 enum class Stage { addParsers, resolveRules };
18 LinkerVisitor();
19 void Visit(OptionalParser& parser) override;
20 void Visit(KleeneParser& parser) override;
21 void Visit(PositiveParser& parser) override;
22 void Visit(ExpectationParser& parser) override;
23 void Visit(GroupingParser& parser) override;
24 void Visit(SequenceParser& parser) override;
25 void Visit(AlternativeParser& parser) override;
26 void Visit(DifferenceParser& parser) override;
27 void Visit(ListParser& parser) override;
28 void Visit(ActionParser& parser) override;
29 void Visit(NonterminalParser& parser) override;
30 void Visit(RuleParser& parser) override;
31 void Visit(GrammarParser& parser) override;
32 void Visit(ParserFile& parserFile) override;
33 void Visit(Domain& domain) override;
34 private:
35 Domain* domain;
36 Stage stage;
37 GrammarParser* currentParser;
38 RuleParser* currentRule;
39 };
40
41 } }
42
43 #endif // SNG2HTML_SNG2HTML_LINKER_VISITOR_INCLUDED