From e73d481438bcd7d0c2afaf8e2541369f4e9e3662 Mon Sep 17 00:00:00 2001 From: Francis Dupont Date: Tue, 10 Jan 2017 21:38:05 +0100 Subject: [PATCH] [5096] Added cql database type --- src/bin/dhcp4/dhcp4_lexer.ll | 9 +++++++++ src/bin/dhcp4/dhcp4_parser.yy | 2 ++ src/bin/dhcp6/dhcp6_lexer.ll | 9 +++++++++ src/bin/dhcp6/dhcp6_parser.yy | 2 ++ 4 files changed, 22 insertions(+) diff --git a/src/bin/dhcp4/dhcp4_lexer.ll b/src/bin/dhcp4/dhcp4_lexer.ll index 82558c2f92..ef0bb2de58 100644 --- a/src/bin/dhcp4/dhcp4_lexer.ll +++ b/src/bin/dhcp4/dhcp4_lexer.ll @@ -270,6 +270,15 @@ ControlCharacterFill [^"\\]|\\{JSONEscapeSequence} } } +\"cql\" { + switch(driver.ctx_) { + case isc::dhcp::Parser4Context::DATABASE_TYPE: + return isc::dhcp::Dhcp4Parser::make_CQL(driver.loc_); + default: + return isc::dhcp::Dhcp4Parser::make_STRING("cql", driver.loc_); + } +} + \"user\" { switch(driver.ctx_) { case isc::dhcp::Parser4Context::LEASE_DATABASE: diff --git a/src/bin/dhcp4/dhcp4_parser.yy b/src/bin/dhcp4/dhcp4_parser.yy index ebc785af96..e94e63d7b9 100644 --- a/src/bin/dhcp4/dhcp4_parser.yy +++ b/src/bin/dhcp4/dhcp4_parser.yy @@ -66,6 +66,7 @@ using namespace std; MEMFILE "memfile" MYSQL "mysql" POSTGRESQL "postgresql" + CQL "cql" USER "user" PASSWORD "password" HOST "host" @@ -495,6 +496,7 @@ database_type: TYPE { db_type: MEMFILE { $$ = ElementPtr(new StringElement("memfile", ctx.loc2pos(@1))); } | MYSQL { $$ = ElementPtr(new StringElement("mysql", ctx.loc2pos(@1))); } | POSTGRESQL { $$ = ElementPtr(new StringElement("postgresql", ctx.loc2pos(@1))); } + | CQL { $$ = ElementPtr(new StringElement("cql", ctx.loc2pos(@1))); } ; user: USER { diff --git a/src/bin/dhcp6/dhcp6_lexer.ll b/src/bin/dhcp6/dhcp6_lexer.ll index 5d2d2b5752..9d29bf4fdd 100644 --- a/src/bin/dhcp6/dhcp6_lexer.ll +++ b/src/bin/dhcp6/dhcp6_lexer.ll @@ -264,6 +264,15 @@ ControlCharacterFill [^"\\]|\\{JSONEscapeSequence} } } +\"cql\" { + switch(driver.ctx_) { + case isc::dhcp::Parser6Context::DATABASE_TYPE: + return isc::dhcp::Dhcp6Parser::make_CQL(driver.loc_); + default: + return isc::dhcp::Dhcp6Parser::make_STRING("cql", driver.loc_); + } +} + \"user\" { switch(driver.ctx_) { case isc::dhcp::Parser6Context::LEASE_DATABASE: diff --git a/src/bin/dhcp6/dhcp6_parser.yy b/src/bin/dhcp6/dhcp6_parser.yy index f93d62788b..4536e41e93 100644 --- a/src/bin/dhcp6/dhcp6_parser.yy +++ b/src/bin/dhcp6/dhcp6_parser.yy @@ -59,6 +59,7 @@ using namespace std; MEMFILE "memfile" MYSQL "mysql" POSTGRESQL "postgresql" + CQL "cql" USER "user" PASSWORD "password" HOST "host" @@ -485,6 +486,7 @@ database_type: TYPE { db_type: MEMFILE { $$ = ElementPtr(new StringElement("memfile", ctx.loc2pos(@1))); } | MYSQL { $$ = ElementPtr(new StringElement("mysql", ctx.loc2pos(@1))); } | POSTGRESQL { $$ = ElementPtr(new StringElement("postgresql", ctx.loc2pos(@1))); } + | CQL { $$ = ElementPtr(new StringElement("cql", ctx.loc2pos(@1))); } ; user: USER { -- 2.47.3