This is a simple script for parsing and writing SML files.

SML is an abbreviation for Superduper Markup Language or Small Markup Language or Simple Markup Language. You can choose whatever name you prefer.

SML is similar to XML in its structure, but has a different syntax. If you are familiar with XML or a similar markup language, understanding SML should be no problem.

The syntax looks like this:
Code:
#root_node
number 123.457
string "hello world"
{
    #node
    some_text '\'escaping'\ or "double quotes"'
    {
        #node
        string_list "one", "two", "three"
        
        /* block comment */
    }
}


The parser returns the root of the SML tree. Unicode is not supported. Editing SML trees is somewhat inconvenient at the moment, as I didn't need such functions yet. All functions are slightly documented in the headerfile. Most function prototypes should be self-explanatory.

You can download the whole stuff here: sml.zip. Demo script is included. You are free to do whatever you want to do with it. Might contain traces of bugs, so beware.