(end-tag-open-state) ( document n/f string ch/f -- document n'/f string )


Vocabulary
html5

Inputs
documentan object
n/fan object
stringan object
ch/fan object


Outputs
documentan object
n'/fan object
stringan object


Definition


: (end-tag-open-state)
( document n/f string ch/f -- document n'/f string )
{
{
[ dup ascii-alpha? ]
[ reach new-end-tag (tag-name-state) ]
}
{
[ dup 62 = ]
[
drop "missing-end-tag-name" report-parse-error
data-state
]
}
{
[ dup f = ]
[
drop "eof-before-tag-name" report-parse-error
"</" reach emit-string pick emit-eof
]
}
[
"invalid-first-character-of-tag-name"
report-parse-error (bogus-comment-state)
]
} cond ;