ftml 0.5.0

Foundation Text Markup Language - a library to render Wikidot text as HTML
Documentation
{
    "<start>": [["<tokens>"]],

    "<tokens>": [["<token>", "<token>"], ["<token>", "<tokens>"]],
    "<token>": [[
        "<raw>",
        "<comment>",
        "<bracket>",
        "<clear-float>",
        "<dash>",
        "<quote>",
        "<heading>",
        "<formatting>",
        "<tas>",
        "<url>",
        "<string>",
        "<alpha>",
        "<number>",
        "<ws>"
    ]],

    "<raw>": [["@", "<"], [">", "@"], ["@", "@"]],
    "<comment>": [["[!--"], ["--]"]],
    "<bracket>": [
        ["["], ["]"], ["[*"], ["[#"],
        ["[["], ["]]"], ["[[*"], ["/]]"],
        ["[[["], ["]]]"]
    ],
    "<clear-float>": [["~~~", "<clear-float-1>"]],
    "<clear-float-1>": [["~"], ["~", "<clear-float-1>"], ["<"], [">"], ["="]],
    "<dash>": [["--"], ["---"], ["----"], ["-", "<dash-1>"]],
    "<dash-1>": [["-"], ["-", "<dash-1>"]],
    "<quote>": [["<quote-1>"], ["<quote-1>", " "]],
    "<quote-1>": [[">"], [">", "<quote-1>"]],
    "<heading>": [["+"], ["++"], ["+++"], ["++++"], ["+++++"], ["++++++"]],
    "<formatting>": [["**"], ["//"], ["__"], ["^^"], [",,"], ["##"], ["{{"], ["}}"]],

    "<block>": [
        ["[[", "<block-name>", "]]"],
        ["[[*", "<block-name>", "]]"],
        ["[[/", "<block-name>", "]]"],
        ["[[<]]"], ["[[/<]]"],
        ["[[>]]"], ["[[/>]]"],
        ["[[=]]"], ["[[/=]]"],
        ["[[==]]"], ["[[/==]]"]
    ],
    "<block-name>": [
        ["a"],
        ["blockquote"],
        ["css"],
        ["div"],
        ["div_"],
        ["html"],
        ["i"],
        ["iframe"],
        ["include"],
        ["module"],
        ["p"],
        ["s"],
        ["span"],
        ["tt"],
        ["u"],
        ["user"]
    ],

    "<url>": [["<url-protocol>", "://", "<url-chars>"]],
    "<url-protocol>": [["http"], ["https"], ["ftp"]],
    "<url-chars>": [["<url-char>"], ["<url-char>", "<url-chars>"]],
    "<url-char>": [["<alphanum>"], ["<symbol>"]],

    "<string>": [["\"", "<string-chars>", "\""]],
    "<string-chars>": [[], ["<string-char>"], ["<string-char>", "<string-chars>"]],
    "<string-char>": [["<escape>"], ["<alphanum>"], ["<symbol>"]],

    "<escape>": [["\\", "<escape-char>"]],
    "<escape-char>": [["\\"], ["r"], ["n"], ["t"], ["\""]],

    "<number>": [["<digit>"], ["<digit>", "<number>"]],
    "<alphanum>": [["<alpha>"], ["<digit>"]],
    "<alpha>": [["<alpha-lower>"], ["<alpha-upper>"]],
    "<alpha-lower>": [["a"], ["b"], ["c"], ["d"], ["e"], ["f"], ["g"], ["h"], ["i"], ["j"], ["k"], ["l"], ["m"], ["n"], ["o"], ["p"], ["q"], ["r"], ["s"], ["t"], ["u"], ["v"], ["w"], ["x"], ["y"], ["z"]],
    "<alpha-upper>": [["A"], ["B"], ["C"], ["D"], ["E"], ["F"], ["G"], ["H"], ["I"], ["J"], ["K"], ["L"], ["M"], ["N"], ["O"], ["P"], ["Q"], ["R"], ["S"], ["T"], ["U"], ["V"], ["W"], ["X"], ["Y"], ["Z"]],
    "<digit>": [["0"], ["1"], ["2"], ["3"], ["4"], ["5"], ["6"], ["7"], ["8"], ["9"]],
    "<symbol>": [["`"], ["~"], ["!"], ["@"], ["#"], ["$"], ["%"], ["^"], ["&"], ["*"], ["("], [")"], ["-"], ["_"], ["="], ["+"], ["["], ["]"], ["{"], ["}"], ["|"], [","], [";"], ["<"], [">"], ["/"], ["?"]],
    "<ws>": [[" "], ["\n"], ["\n\n"], ["\t"], ["\r"]]
}