Handbook
Glossary
(before-doctype-public-identifier-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
sequences
;
IN:
html5
:
(before-doctype-public-identifier-state)
( document n/f string ch/f -- document n'/f string )
{
{
[
dup
"\t\n\f "
member?
]
[
drop
before-doctype-public-identifier-state
]
}
{
[
dup
34
=
]
[
drop
pick
initialize-doctype-public-identifier
doctype-public-identifier-double-quoted-state
]
}
{
[
dup
39
=
]
[
drop
pick
initialize-doctype-public-identifier
doctype-public-identifier-single-quoted-state
]
}
{
[
dup
62
=
]
[
drop
missing-doctype-public-identifier
pick
[
force-quirks
]
[
emit-doctype
]
bi
data-state
]
}
{
[
dup
f
=
]
[
drop
eof-in-doctype
pick
[
emit-doctype
]
[
emit-eof
]
bi
]
}
[
missing-quote-before-doctype-public-identifier
[
reach
force-quirks
]
dip
(bogus-doctype-state)
]
}
cond
;