Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
yaml-cpp
Commits
be925472
Commit
be925472
authored
May 19, 2012
by
Jesse Beder
Browse files
Added old parse utility
parent
c2251264
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
7 deletions
+2
-7
util/parse.cpp
util/parse.cpp
+2
-7
No files found.
util/parse.cpp
View file @
be925472
...
@@ -37,13 +37,8 @@ public:
...
@@ -37,13 +37,8 @@ public:
void
parse
(
std
::
istream
&
input
)
void
parse
(
std
::
istream
&
input
)
{
{
try
{
try
{
YAML
::
Parser
parser
(
input
);
YAML
::
Node
doc
=
YAML
::
Load
(
input
);
YAML
::
Node
doc
;
std
::
cout
<<
doc
<<
"
\n
"
;
while
(
parser
.
GetNextDocument
(
doc
))
{
YAML
::
Emitter
emitter
;
emitter
<<
doc
;
std
::
cout
<<
emitter
.
c_str
()
<<
"
\n
"
;
}
}
catch
(
const
YAML
::
Exception
&
e
)
{
}
catch
(
const
YAML
::
Exception
&
e
)
{
std
::
cerr
<<
e
.
what
()
<<
"
\n
"
;
std
::
cerr
<<
e
.
what
()
<<
"
\n
"
;
}
}
...
...
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