Handbook
Glossary
(before-doctype-name-state) ( document n/f string ch/f -- document n'/f string )
Vocabulary
html5
Inputs
document
an
object
n/f
an
object
string
an
object
ch/f
an
object
Outputs
document
an
object
n'/f
an
object
string
an
object
Definition
USING:
combinators
kernel
math
sequences
;
IN:
html5
:
(before-doctype-name-state)
( document n/f string ch/f -- document n'/f string )
{
{
[
dup
"\t\n\f "
member?
]
[
drop
before-doctype-name-state
]
}
{
[
dup
ascii-upper-alpha?
]
[
32
+
reach
new-doctype-from-ch
doctype-name-state
]
}
{
[
dup
0
=
]
[
drop
unexpected-null-character
65533
reach
new-doctype-from-ch
doctype-name-state
]
}
{
[
dup
62
=
]
[
drop
missing-doctype-name
pick
[
new-doctype-with-quirks
]
[
emit-doctype
]
bi
]
}
{
[
dup
f
=
]
[
drop
eof-in-doctype
pick
[
new-doctype-with-quirks
]
[
emit-doctype
]
[
emit-eof
]
tri
]
}
[
reach
new-doctype-from-ch
doctype-name-state
]
}
cond
;