diff options
author | Razvan Becheriu <razvan@isc.org> | 2022-10-18 14:07:53 +0200 |
---|---|---|
committer | Razvan Becheriu <razvan@isc.org> | 2022-10-24 19:49:34 +0200 |
commit | 80e8c44897d6c28e49267ab623b1203db97c75fb (patch) | |
tree | 71eec5961abe7a2de6755002ad257fe06dd00e0e /src/bin/dhcp6/dhcp6_parser.yy | |
parent | [#248] using same add/get class interface (diff) | |
download | kea-80e8c44897d6c28e49267ab623b1203db97c75fb.tar.xz kea-80e8c44897d6c28e49267ab623b1203db97c75fb.zip |
[#248] template classes can add regular classes
Diffstat (limited to 'src/bin/dhcp6/dhcp6_parser.yy')
-rw-r--r-- | src/bin/dhcp6/dhcp6_parser.yy | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/bin/dhcp6/dhcp6_parser.yy b/src/bin/dhcp6/dhcp6_parser.yy index 23d12eb637..18e90b911d 100644 --- a/src/bin/dhcp6/dhcp6_parser.yy +++ b/src/bin/dhcp6/dhcp6_parser.yy @@ -168,7 +168,7 @@ using namespace std; CLIENT_CLASSES "client-classes" REQUIRE_CLIENT_CLASSES "require-client-classes" TEST "test" - TEMPLATE_CLASS "template-class" + TEMPLATE_TEST "template-test" ONLY_IF_REQUIRED "only-if-required" CLIENT_CLASS "client-class" @@ -2408,7 +2408,7 @@ not_empty_client_class_params: client_class_param client_class_param: client_class_name | client_class_test - | client_class_template_class + | client_class_template_test | only_if_required | option_data_list | user_context @@ -2433,10 +2433,13 @@ client_class_test: TEST { ctx.leave(); }; -client_class_template_class: TEMPLATE_CLASS COLON BOOLEAN { - ctx.unique("template-class", ctx.loc2pos(@1)); - ElementPtr b(new BoolElement($3, ctx.loc2pos(@3))); - ctx.stack_.back()->set("template-class", b); +client_class_template_test: TEMPLATE_TEST { + ctx.unique("template-test", ctx.loc2pos(@1)); + ctx.enter(ctx.NO_KEYWORD); +} COLON STRING { + ElementPtr template_test(new StringElement($4, ctx.loc2pos(@4))); + ctx.stack_.back()->set("template-test", template_test); + ctx.leave(); }; only_if_required: ONLY_IF_REQUIRED COLON BOOLEAN { |