YAML Parsing

Published February 21, 2014
Advertisement
Hello Again,

I have just made a mega-post on how to parse YAML with C++ using yaml-cpp.
It goes a little about YAML syntax as well.

It was supposed to be an article here at GD.net, but I was having too many problems with the editor...
So I decided to post it to my blog first, and let the fight against lost formatting for later.

It will probably be coming in the next days, but for those of you who don't want to wait, here it goes:
http://www.buildandgun.com/2014/02/yaml-yaml-aint-markup-language.html

The code wasn't really tested, just load and print.
If you find any problems let me know and I'll fix them right away!

@edit:
I finished the GD.net article as well, for those who don't want to leave here:
https://www.gamedev.net/index.php?app=ccs&module=pages&section=pages&do=redirect&database=1&record=3508
It is still awaiting approval though, but will probably be available soon.

@edit:
It is now online! Thanks for Gaiden for the review (and the discovery of new victims!)
3 likes 4 comments

Comments

jbadams

Thanks for sharing!

Out of interest, what issues were you having with the article editor, and what browser/OS are you using? We'd love to improve the editor if you have some suggestions. :)

February 21, 2014 08:14 AM
DejaimeNeto

I used Firefox on Windows7, Firefox/Chromium on Xubuntu 13.10 and Firefox on Lubuntu 13.10 (it took quite long to write this article).

Initially, the only problem I had was the spell checking, as it wasn't working I had to keep on pasting from the editor to somewhere else in order to check my spelling (that usually has lots of corrections).

But soon, the editor started to behave quite weirdly, and the text sometimes simply vanished; It was just a visual glitch though, selecting the text would make it render properly again. Still, as this was a really big wall of text, this was just starting to bother me.

When I was getting near the end of the article, I wanted to include an anchor at the top, to create an internal link. Unfortunately, it did not receive my anchor well. When I saved the article, it moved the </a> (that wasn't surrounding any text, was just <a name="n"></a>) to the end of the article, and the formating in between was lost. Every list, blockquotes, headers, lost their initial tag, leaving only the closing tags, so the article lost almost all of its formatting...

So I just moved it to blogger... moving it back here once ready was really easier!

@edit:
Look at this image:
http://s9.postimg.org/rdtx40bz3/duotone.png

The arrow shows where the text "article lost almost all of its formatting..." vanished.

February 21, 2014 03:01 PM
jbadams

That does sound like an unpleasant editing experience -- we'll see if we can figure out what might have happened, that definitely isn't the easy experience we want to offer!

Thanks for the detailed report! :)

February 23, 2014 12:57 AM
Servant of the Lord

Thanks for sharing your thoughts on YAML! Interesting read.

February 24, 2014 05:31 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement