mardi 29 septembre 2015

Trying to understand number of ParseError in html5lib-test

I was looking at following test case in html5lib-tests:

{"description":"<!DOCTYPE\\u0008",
"input":"<!DOCTYPE\u0008",
"output":["ParseError", "ParseError", "ParseError", 
           ["DOCTYPE",  "\u0008", null, null, false]]},

source

State                      |Input char |  Actions
--------------------------------------------------------------------------------------------
Data State                 |  "<"      | -> TagOpenState
TagOpenState               | "!"       | -> MarkupDeclarationOpenState
MarkupDeclarationOpenState | "DOCTYPE" | -> DOCTYPE state
DOCTYPE state              | "\u0008"  | Parse error; -> before DOCTYPE name state (reconsume)
before DOCTYPE name state  | "\u0008"  | DOCTYPE(name = "\u0008"); -> DOCTYPE name state
DOCTYPE name state         | EOF       | Parse error. Set force quirks on. Emit DOCTYPE -> Data state. 
Data state                 | EOF       | Emit EOF.

I'm wondering where do those three errors come from? I can only track two, but I assume I'm making an error in logic, somewhere.

Aucun commentaire:

Enregistrer un commentaire