Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
R
rapidjson
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
rapidjson
Commits
c9f27151
Commit
c9f27151
authored
Aug 11, 2014
by
Philipp A. Hartmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reader: drop object/array root restrction from iterative parser
parent
edccda00
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
6 deletions
+23
-6
reader.h
include/rapidjson/reader.h
+23
-6
No files found.
include/rapidjson/reader.h
View file @
c9f27151
...
...
@@ -903,6 +903,9 @@ private:
IterativeParsingElementDelimiterState
,
IterativeParsingArrayFinishState
,
// Single value state
IterativeParsingValueState
,
cIterativeParsingStateCount
};
...
...
@@ -961,11 +964,11 @@ private:
IterativeParsingErrorState
,
// Right curly bracket
IterativeParsingErrorState
,
// Comma
IterativeParsingErrorState
,
// Colon
IterativeParsingErrorState
,
// String
IterativeParsingErrorState
,
// False
IterativeParsingErrorState
,
// True
IterativeParsingErrorState
,
// Null
IterativeParsingErrorState
// Number
IterativeParsingValueState
,
// String
IterativeParsingValueState
,
// False
IterativeParsingValueState
,
// True
IterativeParsingValueState
,
// Null
IterativeParsingValueState
// Number
},
// Finish(sink state)
{
...
...
@@ -1102,6 +1105,12 @@ private:
IterativeParsingErrorState
,
IterativeParsingErrorState
,
IterativeParsingErrorState
,
IterativeParsingErrorState
,
IterativeParsingErrorState
,
IterativeParsingErrorState
,
IterativeParsingErrorState
,
IterativeParsingErrorState
,
IterativeParsingErrorState
,
IterativeParsingErrorState
,
IterativeParsingErrorState
},
// Single Value (sink state)
{
IterativeParsingErrorState
,
IterativeParsingErrorState
,
IterativeParsingErrorState
,
IterativeParsingErrorState
,
IterativeParsingErrorState
,
IterativeParsingErrorState
,
IterativeParsingErrorState
,
IterativeParsingErrorState
,
IterativeParsingErrorState
,
IterativeParsingErrorState
,
IterativeParsingErrorState
}
};
// End of G
...
...
@@ -1238,6 +1247,14 @@ private:
}
}
case
IterativeParsingValueState
:
// Must be non-compound value. Or it would be ObjectInitial or ArrayInitial state.
ParseValue
<
parseFlags
>
(
is
,
handler
);
if
(
HasParseError
())
{
return
IterativeParsingErrorState
;
}
return
IterativeParsingFinishState
;
default
:
RAPIDJSON_ASSERT
(
false
);
return
IterativeParsingErrorState
;
...
...
@@ -1252,7 +1269,7 @@ private:
}
switch
(
src
)
{
case
IterativeParsingStartState
:
RAPIDJSON_PARSE_ERROR
(
is
.
Peek
()
==
'\0'
?
kParseErrorDocumentEmpty
:
kParseErrorDocumentRootNotObjectOrArra
y
,
is
.
Tell
());
case
IterativeParsingStartState
:
RAPIDJSON_PARSE_ERROR
(
kParseErrorDocumentEmpt
y
,
is
.
Tell
());
case
IterativeParsingFinishState
:
RAPIDJSON_PARSE_ERROR
(
kParseErrorDocumentRootNotSingular
,
is
.
Tell
());
case
IterativeParsingObjectInitialState
:
case
IterativeParsingMemberDelimiterState
:
RAPIDJSON_PARSE_ERROR
(
kParseErrorObjectMissName
,
is
.
Tell
());
...
...
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