Sign in to follow this  
excito

STOB markup language

Recommended Posts

Hi,

 

let me introduce another markup language I came up with for my projects. I called it STOB. I tried to keep language as simple as possible but not for the price of its power.

The document in STOB is essentially a tree of "strings", i.e. string can have child strings etc.

Here is sample snippet:

"String object"
AnotherStringObject
"String with children"{
    "child 1"
    Child2
    "child three"{
        SubChild1
        "Subchild two"

        Property1 {Value1}
        "Property two" {"Value 2"}
        //comment

        /* multi-line
           comment */

        "multi-line
         string"

        "Escape sequences \" \n \r \t \\"
    }
}

I know about existing stuff like XML, JSON, YAML etc.

I would say YAML is the closest one, but still more complicated.

 

But let me list some pros and cons as I see them:

 

Pros:

 - human readable

 - uses curly braces

 - does not use indentation for scopes, it allows save space for not-formatted documents

 - less commas, double quotes, colons, square brackets

 - C/C++ style comments

 - C/C++ style escape sequences

 

Cons:

 - hard to come up with convenient markup rules to markup text, like bold italic etc.

 

Website with spec: http://stobml.org

C++ parser library: http://stob.googlecode.com

Java parser library: http://stob-java.googlecode.com

C# parser library: http://stob-cs.googlecode.com

 

I made this post to tell about my language in hope it will be useful to someone. But any feedback and critics are welcomed.

Edited by igagis

Share this post


Link to post
Share on other sites
Sign in to follow this