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
445
Issues
445
List
Boards
Labels
Service Desk
Milestones
Merge Requests
71
Merge Requests
71
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
ISC Open Source Projects
Kea
Commits
d25a434d
Commit
d25a434d
authored
Nov 14, 2012
by
JINMEI Tatuya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[2373] some more comment updates
parent
1ed3ca78
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
src/lib/dns/master_lexer.cc
src/lib/dns/master_lexer.cc
+5
-1
src/lib/dns/tests/master_lexer_state_unittest.cc
src/lib/dns/tests/master_lexer_state_unittest.cc
+2
-0
No files found.
src/lib/dns/master_lexer.cc
View file @
d25a434d
...
...
@@ -64,9 +64,13 @@ struct MasterLexer::MasterLexerImpl {
}
bool
isTokenEnd
(
int
c
,
bool
escaped
)
{
// Special case of EOF (end of stream); this is not in the bitmaps
if
(
c
==
InputSource
::
END_OF_STREAM
)
{
return
(
true
);
}
// In this implementation we only ensure the behavior for unsigned
// range of characters, so we restrict the range of the values up to
// 0x7f = 127
return
(
escaped
?
esc_separators_
.
test
(
c
&
0x7f
)
:
separators_
.
test
(
c
&
0x7f
));
}
...
...
@@ -84,7 +88,7 @@ struct MasterLexer::MasterLexerImpl {
// Bitmaps that gives whether a given (positive) character should be
// considered a separator of a string/number token. The esc_ version
// is a subset of the other, excluding characters that can be ignored
// if escaped by a backslash.
// if escaped by a backslash.
See isTokenEnd() for the bitmap size.
std
::
bitset
<
128
>
separators_
;
std
::
bitset
<
128
>
esc_separators_
;
};
...
...
src/lib/dns/tests/master_lexer_state_unittest.cc
View file @
d25a434d
...
...
@@ -255,6 +255,8 @@ TEST_F(MasterLexerStateTest, crlf) {
EXPECT_EQ
(
Token
::
END_OF_FILE
,
s_crlf
.
getToken
(
lexer
).
getType
());
}
// Commonly used check for string related test cases, checking if the given
// token has expected values.
void
stringTokenCheck
(
const
std
::
string
&
expected
,
const
MasterLexer
::
Token
&
token
,
bool
quoted
=
false
)
...
...
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