Handbook
Glossary
(tag-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
:
(tag-name-state)
( document n/f string ch/f -- document n'/f string )
{
{
[
dup
ascii-upper-alpha?
]
[
32
+
reach
push-tag-name
tag-name-state
]
}
{
[
dup
"\t\n\f "
member?
]
[
drop
before-attribute-name-state
]
}
{
[
dup
47
=
]
[
drop
self-closing-start-tag-state
]
}
{
[
dup
62
=
]
[
drop
pick
emit-tag
data-state
]
}
{
[
dup
0
=
]
[
unexpected-null-character
]
}
{
[
dup
f
=
]
[
eof-before-tag-name
]
}
[
reach
push-tag-name
tag-name-state
]
}
cond
;