blob: f3e1994d525efec3305a577b208f8b3c1f9c6907 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#pragma once
#include "SimpleGrammar.hpp"
#include "TriggerGrammar.hpp"
#include <lexy/dsl.hpp>
namespace ovdl::v2script::grammar {
constexpr auto modifier_keyword = LEXY_KEYWORD("modifier", lexy::dsl::inline_<Identifier>);
constexpr auto factor_keyword = LEXY_KEYWORD("factor", lexy::dsl::inline_<Identifier>);
struct AiModifierStatement {
static constexpr auto rule =
modifier_keyword >>
lexy::dsl::curly_bracketed.list(
(factor_keyword >> lexy::dsl::p<Identifier>) |
lexy::dsl::p<TriggerStatement>);
};
struct AiBehaviorList {
static constexpr auto rule = lexy::dsl::list((factor_keyword >> lexy::dsl::p<Identifier>) | lexy::dsl::p<AiModifierStatement>);
};
}
|