Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Kea
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sebastian Schrader
Kea
Commits
aa945299
Commit
aa945299
authored
Apr 18, 2017
by
Tomek Mrugalski
🛰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[5187] flush, maxsize and maxver parameters added to all parsers.
parent
64529396
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
221 additions
and
16 deletions
+221
-16
src/bin/agent/agent_lexer.ll
src/bin/agent/agent_lexer.ll
+27
-0
src/bin/agent/agent_parser.yy
src/bin/agent/agent_parser.yy
+28
-4
src/bin/d2/d2_lexer.ll
src/bin/d2/d2_lexer.ll
+27
-0
src/bin/d2/d2_parser.yy
src/bin/d2/d2_parser.yy
+28
-4
src/bin/dhcp4/dhcp4_lexer.ll
src/bin/dhcp4/dhcp4_lexer.ll
+27
-0
src/bin/dhcp4/dhcp4_parser.yy
src/bin/dhcp4/dhcp4_parser.yy
+28
-4
src/bin/dhcp6/dhcp6_lexer.ll
src/bin/dhcp6/dhcp6_lexer.ll
+28
-0
src/bin/dhcp6/dhcp6_parser.yy
src/bin/dhcp6/dhcp6_parser.yy
+28
-4
No files found.
src/bin/agent/agent_lexer.ll
View file @
aa945299
...
...
@@ -329,6 +329,33 @@ ControlCharacterFill [^"\\]|\\{JSONEscapeSequence}
}
}
\"
flush\
" {
switch(driver.ctx_) {
case ParserContext::OUTPUT_OPTIONS:
return AgentParser::make_FLUSH(driver.loc_);
default:
return AgentParser::make_STRING("
flush
", driver.loc_);
}
}
\"
maxsize\
" {
switch(driver.ctx_) {
case ParserContext::OUTPUT_OPTIONS:
return AgentParser::make_MAXSIZE(driver.loc_);
default:
return AgentParser::make_STRING("
maxsize
", driver.loc_);
}
}
\"
maxver\
" {
switch(driver.ctx_) {
case ParserContext::OUTPUT_OPTIONS:
return AgentParser::make_MAXVER(driver.loc_);
default:
return AgentParser::make_STRING("
maxver
", driver.loc_);
}
}
\"
debuglevel\
" {
switch(driver.ctx_) {
case ParserContext::LOGGERS:
...
...
src/bin/agent/agent_parser.yy
View file @
aa945299
...
...
@@ -71,6 +71,9 @@ using namespace std;
OUTPUT "output"
DEBUGLEVEL "debuglevel"
SEVERITY "severity"
FLUSH "flush"
MAXSIZE "maxsize"
MAXVER "maxver"
DHCP4 "Dhcp4"
DHCP6 "Dhcp6"
...
...
@@ -549,15 +552,21 @@ output_entry: LCURLY_BRACKET {
ElementPtr m(new MapElement(ctx.loc2pos(@1)));
ctx.stack_.back()->add(m);
ctx.stack_.push_back(m);
} output_params RCURLY_BRACKET {
} output_params
_list
RCURLY_BRACKET {
ctx.stack_.pop_back();
};
output_params
: output_param
| output_params
COMMA output_param
output_params
_list: output_params
| output_params
_list COMMA output_params
;
output_param: OUTPUT {
output_params: output
| flush
| maxsize
| maxver
;
output: OUTPUT {
ctx.enter(ctx.NO_KEYWORDS);
} COLON STRING {
ElementPtr sev(new StringElement($4, ctx.loc2pos(@4)));
...
...
@@ -565,6 +574,21 @@ output_param: OUTPUT {
ctx.leave();
};
flush: FLUSH COLON BOOLEAN {
ElementPtr flush(new BoolElement($3, ctx.loc2pos(@3)));
ctx.stack_.back()->set("flush", flush);
}
maxsize: MAXSIZE COLON INTEGER {
ElementPtr maxsize(new IntElement($3, ctx.loc2pos(@3)));
ctx.stack_.back()->set("maxsize", maxsize);
}
maxver: MAXVER COLON INTEGER {
ElementPtr maxver(new IntElement($3, ctx.loc2pos(@3)));
ctx.stack_.back()->set("maxver", maxver);
}
%%
void
...
...
src/bin/d2/d2_lexer.ll
View file @
aa945299
...
...
@@ -389,6 +389,33 @@ ControlCharacterFill [^"\\]|\\{JSONEscapeSequence}
}
}
\"
flush\
" {
switch(driver.ctx_) {
case isc::d2::D2ParserContext::OUTPUT_OPTIONS:
return isc::d2::D2Parser::make_FLUSH(driver.loc_);
default:
return isc::d2::D2Parser::make_STRING("
flush
", driver.loc_);
}
}
\"
maxsize\
" {
switch(driver.ctx_) {
case isc::d2::D2ParserContext::OUTPUT_OPTIONS:
return isc::d2::D2Parser::make_MAXSIZE(driver.loc_);
default:
return isc::d2::D2Parser::make_STRING("
maxsize
", driver.loc_);
}
}
\"
maxver\
" {
switch(driver.ctx_) {
case isc::d2::D2ParserContext::OUTPUT_OPTIONS:
return isc::d2::D2Parser::make_MAXVER(driver.loc_);
default:
return isc::d2::D2Parser::make_STRING("
maxver
", driver.loc_);
}
}
\"
name
\
" {
switch(driver.ctx_) {
case isc::d2::D2ParserContext::LOGGERS:
...
...
src/bin/d2/d2_parser.yy
View file @
aa945299
...
...
@@ -79,6 +79,9 @@ using namespace std;
OUTPUT "output"
DEBUGLEVEL "debuglevel"
SEVERITY "severity"
FLUSH "flush"
MAXSIZE "maxsize"
MAXVER "maxver"
// Not real tokens, just a way to signal what the parser is expected to
// parse.
...
...
@@ -711,15 +714,21 @@ output_entry: LCURLY_BRACKET {
ElementPtr m(new MapElement(ctx.loc2pos(@1)));
ctx.stack_.back()->add(m);
ctx.stack_.push_back(m);
} output_params RCURLY_BRACKET {
} output_params
_list
RCURLY_BRACKET {
ctx.stack_.pop_back();
};
output_params
: output_param
| output_params
COMMA output_param
output_params
_list: output_params
| output_params
_list COMMA output_params
;
output_param: OUTPUT {
output_params: output
| flush
| maxsize
| maxver
;
output: OUTPUT {
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
ElementPtr sev(new StringElement($4, ctx.loc2pos(@4)));
...
...
@@ -727,6 +736,21 @@ output_param: OUTPUT {
ctx.leave();
};
flush: FLUSH COLON BOOLEAN {
ElementPtr flush(new BoolElement($3, ctx.loc2pos(@3)));
ctx.stack_.back()->set("flush", flush);
}
maxsize: MAXSIZE COLON INTEGER {
ElementPtr maxsize(new IntElement($3, ctx.loc2pos(@3)));
ctx.stack_.back()->set("maxsize", maxsize);
}
maxver: MAXVER COLON INTEGER {
ElementPtr maxver(new IntElement($3, ctx.loc2pos(@3)));
ctx.stack_.back()->set("maxver", maxver);
}
%%
void
...
...
src/bin/dhcp4/dhcp4_lexer.ll
View file @
aa945299
...
...
@@ -630,6 +630,33 @@ ControlCharacterFill [^"\\]|\\{JSONEscapeSequence}
}
}
\"
flush\
" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::OUTPUT_OPTIONS:
return isc::dhcp::Dhcp4Parser::make_FLUSH(driver.loc_);
default:
return isc::dhcp::Dhcp4Parser::make_STRING("
flush
", driver.loc_);
}
}
\"
maxsize\
" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::OUTPUT_OPTIONS:
return isc::dhcp::Dhcp4Parser::make_MAXSIZE(driver.loc_);
default:
return isc::dhcp::Dhcp4Parser::make_STRING("
maxsize
", driver.loc_);
}
}
\"
maxver\
" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::OUTPUT_OPTIONS:
return isc::dhcp::Dhcp4Parser::make_MAXVER(driver.loc_);
default:
return isc::dhcp::Dhcp4Parser::make_STRING("
maxver
", driver.loc_);
}
}
\"
severity\
" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::LOGGERS:
...
...
src/bin/dhcp4/dhcp4_parser.yy
View file @
aa945299
...
...
@@ -173,6 +173,9 @@ using namespace std;
OUTPUT "output"
DEBUGLEVEL "debuglevel"
SEVERITY "severity"
FLUSH "flush"
MAXSIZE "maxsize"
MAXVER "maxver"
DHCP6 "Dhcp6"
DHCPDDNS "DhcpDdns"
...
...
@@ -1731,15 +1734,21 @@ output_entry: LCURLY_BRACKET {
ElementPtr m(new MapElement(ctx.loc2pos(@1)));
ctx.stack_.back()->add(m);
ctx.stack_.push_back(m);
} output_params RCURLY_BRACKET {
} output_params
_list
RCURLY_BRACKET {
ctx.stack_.pop_back();
};
output_params: output_param
| output_params COMMA output_param
output_params_list: output_params
| output_params_list COMMA output_params
;
output_params: output
| flush
| maxsize
| maxver
;
output
_param
: OUTPUT {
output: OUTPUT {
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
ElementPtr sev(new StringElement($4, ctx.loc2pos(@4)));
...
...
@@ -1747,6 +1756,21 @@ output_param: OUTPUT {
ctx.leave();
};
flush: FLUSH COLON BOOLEAN {
ElementPtr flush(new BoolElement($3, ctx.loc2pos(@3)));
ctx.stack_.back()->set("flush", flush);
}
maxsize: MAXSIZE COLON INTEGER {
ElementPtr maxsize(new IntElement($3, ctx.loc2pos(@3)));
ctx.stack_.back()->set("maxsize", maxsize);
}
maxver: MAXVER COLON INTEGER {
ElementPtr maxver(new IntElement($3, ctx.loc2pos(@3)));
ctx.stack_.back()->set("maxver", maxver);
}
%%
void
...
...
src/bin/dhcp6/dhcp6_lexer.ll
View file @
aa945299
...
...
@@ -897,6 +897,34 @@ ControlCharacterFill [^"\\]|\\{JSONEscapeSequence}
}
}
\"
flush\
" {
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::OUTPUT_OPTIONS:
return isc::dhcp::Dhcp6Parser::make_FLUSH(driver.loc_);
default:
return isc::dhcp::Dhcp6Parser::make_STRING("
flush
", driver.loc_);
}
}
\"
maxsize\
" {
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::OUTPUT_OPTIONS:
return isc::dhcp::Dhcp6Parser::make_MAXSIZE(driver.loc_);
default:
return isc::dhcp::Dhcp6Parser::make_STRING("
maxsize
", driver.loc_);
}
}
\"
maxver\
" {
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::OUTPUT_OPTIONS:
return isc::dhcp::Dhcp6Parser::make_MAXVER(driver.loc_);
default:
return isc::dhcp::Dhcp6Parser::make_STRING("
maxver
", driver.loc_);
}
}
\"
debuglevel\
" {
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::LOGGERS:
...
...
src/bin/dhcp6/dhcp6_parser.yy
View file @
aa945299
...
...
@@ -180,6 +180,9 @@ using namespace std;
OUTPUT "output"
DEBUGLEVEL "debuglevel"
SEVERITY "severity"
FLUSH "flush"
MAXSIZE "maxsize"
MAXVER "maxver"
DHCP4 "Dhcp4"
DHCPDDNS "DhcpDdns"
...
...
@@ -1820,15 +1823,21 @@ output_entry: LCURLY_BRACKET {
ElementPtr m(new MapElement(ctx.loc2pos(@1)));
ctx.stack_.back()->add(m);
ctx.stack_.push_back(m);
} output_params RCURLY_BRACKET {
} output_params
_list
RCURLY_BRACKET {
ctx.stack_.pop_back();
};
output_params: output_param
| output_params COMMA output_param
output_params_list: output_params
| output_params_list COMMA output_params
;
output_params: output
| flush
| maxsize
| maxver
;
output
_param
: OUTPUT {
output: OUTPUT {
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
ElementPtr sev(new StringElement($4, ctx.loc2pos(@4)));
...
...
@@ -1836,6 +1845,21 @@ output_param: OUTPUT {
ctx.leave();
};
flush: FLUSH COLON BOOLEAN {
ElementPtr flush(new BoolElement($3, ctx.loc2pos(@3)));
ctx.stack_.back()->set("flush", flush);
}
maxsize: MAXSIZE COLON INTEGER {
ElementPtr maxsize(new IntElement($3, ctx.loc2pos(@3)));
ctx.stack_.back()->set("maxsize", maxsize);
}
maxver: MAXVER COLON INTEGER {
ElementPtr maxver(new IntElement($3, ctx.loc2pos(@3)));
ctx.stack_.back()->set("maxver", maxver);
}
%%
void
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment