xmlparser 0.1.1

Pull-based, zero-allocation XML parser.
Documentation
{"tests": [

{"description":"Comment",
"input":"<!--comment-->",
"output":[
    { "Comment": "comment" }
]},

{"description":"<head> in Comment",
"input":"<!--<head>-->",
"output":[
    { "Comment": "<head>" }
]},

{"description":"Comments 3",
"input":"<!----->",
"output":[
    { "Comment": "-" }
]},

{"description":"Comments 5",
"input":"<!--x-->",
"output":[
    { "Comment": "x" }
]},

{"description":"Comments 6",
"input":"<!--<!-x-->",
"output":[
    { "Comment": "<!-x" }
]},

{"description":"Comments 7",
"input":"<!--<!x-->",
"output":[
    { "Comment": "<!x" }
]},

{"description":"Comments 8",
"input":"<!--<<!x-->",
"output":[
    { "Comment": "<<!x" }
]},

{"description":"Comments 9",
"input":"<!--<<!-x-->",
"output":[
    { "Comment": "<<!-x" }
]},

{"description":"Comments 10",
"input":"<!--<x-->",
"output":[
    { "Comment": "<x" }
]},

{"description":"Comments 11",
"input":"<!--<>-->",
"output":[
    { "Comment": "<>" }
]},

{"description":"Comments 12",
"input":"<!--<-->",
"output":[
    { "Comment": "<" }
]},

{"description":"Comments 13",
"input":"<!--<--->",
"output":[
    { "Comment": "<-" }
]},

{"description":"Comments 13",
"input":"<!--<!-->",
"output":[
    { "Comment": "<!" }
]},

{"description":"Comments long",
"input":"<!---->",
"output":[
    { "Comment": "" }
]},

{"description":"Error comment --!>",
"input":"<!----!>",
"output":[
    { "Error" : "Error: invalid token 'Comment' at 1:1\n" }
]},

{"description":"EOF inside comment",
"input":"<!----!",
"output":[
    { "Error" : "Error: invalid token 'Comment' at 1:1\n" }
]},

{"description":"EOF inside comment 2",
"input":"<!----",
"output":[
    { "Error" : "Error: invalid token 'Comment' at 1:1\n" }
]},

{"description":"EOF inside comment 3",
"input":"<!--->",
"output":[
    { "Error" : "Error: invalid token 'Comment' at 1:1\n" }
]},

{"description":"EOF inside comment 4",
"input":"<!-----",
"output":[
    { "Error" : "Error: invalid token 'Comment' at 1:1\n" }
]},

{"description":"EOF inside comment 5",
"input":"<!-->",
"output":[
    { "Error" : "Error: invalid token 'Comment' at 1:1\n" }
]},

{"description":"EOF inside comment 6",
"input":"<!--",
"output":[
    { "Error" : "Error: invalid token 'Comment' at 1:1\n" }
]},

{"description":"EOF inside comment 7",
"input":"<!--x",
"output":[
    { "Error" : "Error: invalid token 'Comment' at 1:1\n" }
]},

{"description":"EOF inside comment 8",
"input":"<!--<",
"output":[
    { "Error" : "Error: invalid token 'Comment' at 1:1\n" }
]},

{"description":"EOF inside comment 9",
"input":"<!--<!",
"output":[
    { "Error" : "Error: invalid token 'Comment' at 1:1\n" }
]},

{"description":"EOF inside comment 10",
"input":"<!--<!-",
"output":[
    { "Error" : "Error: invalid token 'Comment' at 1:1\n" }
]},

{"description":"EOF inside comment 11",
"input":"<!--<!--",
"output":[
    { "Error" : "Error: invalid token 'Comment' at 1:1\n" }
]},

{"description":"EOF inside comment 12",
"input":"<!--<!--!",
"output":[
    { "Error" : "Error: invalid token 'Comment' at 1:1\n" }
]},

{"description":"<!-- inside comment",
"input":"<!--<!--!>",
"output":[
    { "Error" : "Error: invalid token 'Comment' at 1:1\n" }
]},

{"description":"<!-- inside comment 2",
"input":"<!--<!---",
"output":[
    { "Error" : "Error: invalid token 'Comment' at 1:1\n" }
]},

{"description":"<!-- inside comment 4",
"input":"<!--<!--x",
"output":[
    { "Error" : "Error: invalid token 'Comment' at 1:1\n" }
]},

{"description":"<!-- inside comment 5",
"input":"<!--<!--x-",
"output":[
    { "Error" : "Error: invalid token 'Comment' at 1:1\n" }
]},

{"description":"<!-- inside comment 6",
"input":"<!--<!--x--",
"output":[
    { "Error" : "Error: invalid token 'Comment' at 1:1\n" }
]},

{"description":"<!-- inside comment 7",
"input":"<!--<!--x-->",
"output":[
    { "Error" : "Error: invalid token 'Comment' at 1:1\n" }
]},

{"description":"<!-- inside comment 8",
"input":"<!--<!-x",
"output":[
    { "Error" : "Error: invalid token 'Comment' at 1:1\n" }
]},

{"description":"<!-- inside comment 9",
"input":"<!--<!-x-",
"output":[
    { "Error" : "Error: invalid token 'Comment' at 1:1\n" }
]},

{"description":"<!-- inside comment 10",
"input":"<!--<!-x--",
"output":[
    { "Error" : "Error: invalid token 'Comment' at 1:1\n" }
]},

{"description":"<!-- inside comment 11",
"input":"<!--<!x",
"output":[
    { "Error" : "Error: invalid token 'Comment' at 1:1\n" }
]},

{"description":"<!-- inside comment 12",
"input":"<!--<!x-",
"output":[
    { "Error" : "Error: invalid token 'Comment' at 1:1\n" }
]},

{"description":"<!-- inside comment 13",
"input":"<!--<!x--",
"output":[
    { "Error" : "Error: invalid token 'Comment' at 1:1\n" }
]},

{"description":"<!-- inside comment 14",
"input":"<!--<<!--x-->",
"output":[
    { "Error" : "Error: invalid token 'Comment' at 1:1\n" }
]},

{"description":"<!-- inside comment 15",
"input":"<!--<!<!--x-->",
"output":[
    { "Error" : "Error: invalid token 'Comment' at 1:1\n" }
]},

{"description":"<!-- inside comment 16",
"input":"<!--<!-<!--x-->",
"output":[
    { "Error" : "Error: invalid token 'Comment' at 1:1\n" }
]},

{"description":"EOF inside comment 13",
"input":"<!----!->",
"output":[
    { "Error" : "Error: invalid token 'Comment' at 1:1\n" }
]},

{"description":"EOF inside comment 14",
"input":"<!----!x>",
"output":[
    { "Error" : "Error: invalid token 'Comment' at 1:1\n" }
]},

{"description":"EOF inside comment 15",
"input":"<!-----x>",
"output":[
    { "Error" : "Error: invalid token 'Comment' at 1:1\n" }
]},

{"description":"Tiny Bogus Comment",
"input":"<!>",
"output":[
    { "Error" : "Error: unknown token at 1:1\n" }
]},

{"description":"Short Bogus Comment",
"input":"<!-->",
"output":[
    { "Error" : "Error: invalid token 'Comment' at 1:1\n" }
]},

{"description":"Short Bogus Comment2",
"input":"<!-->test",
"output":[
    { "Error" : "Error: invalid token 'Comment' at 1:1\n" }
]}

]}