forked from freeorion/freeorion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConditionParser.cpp
58 lines (52 loc) · 2.32 KB
/
ConditionParser.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#include "ConditionParserImpl.h"
#include "ConditionParser1.h"
#include "ConditionParser2.h"
#include "ConditionParser3.h"
#include "ConditionParser4.h"
#include "ConditionParser5.h"
#include "ConditionParser6.h"
#include "ConditionParser7.h"
namespace parse {
struct conditions_parser_grammar::Impl {
Impl(conditions_parser_grammar& conditions_parser_grammar,
const parse::lexer& tok,
detail::Labeller& label
) :
string_grammar(tok, label, conditions_parser_grammar),
condition_parser_1(tok, label, conditions_parser_grammar, string_grammar),
condition_parser_2(tok, label, conditions_parser_grammar, string_grammar),
condition_parser_3(tok, label, conditions_parser_grammar, string_grammar),
condition_parser_4(tok, label, conditions_parser_grammar, string_grammar),
condition_parser_5(tok, label, conditions_parser_grammar, string_grammar),
condition_parser_6(tok, label, conditions_parser_grammar, string_grammar),
condition_parser_7(tok, label, conditions_parser_grammar, string_grammar)
{}
const parse::string_parser_grammar string_grammar;
detail::condition_parser_rules_1 condition_parser_1;
detail::condition_parser_rules_2 condition_parser_2;
detail::condition_parser_rules_3 condition_parser_3;
detail::condition_parser_rules_4 condition_parser_4;
detail::condition_parser_rules_5 condition_parser_5;
detail::condition_parser_rules_6 condition_parser_6;
detail::condition_parser_rules_7 condition_parser_7;
};
conditions_parser_grammar::conditions_parser_grammar(
const parse::lexer& tok,
detail::Labeller& label
) :
conditions_parser_grammar::base_type(start, "conditions_parser_grammar"),
m_impl(std::make_unique<conditions_parser_grammar::Impl>(*this, tok, label))
{
start
= m_impl->condition_parser_1
| m_impl->condition_parser_2
| m_impl->condition_parser_3
| m_impl->condition_parser_4
| m_impl->condition_parser_5
| m_impl->condition_parser_6
| m_impl->condition_parser_7
;
start.name("Condition");
}
conditions_parser_grammar::~conditions_parser_grammar() = default;
}