Handbook
Glossary
(tag-open-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
;
IN:
html5
:
(tag-open-state)
( document n/f string ch/f -- document n'/f string )
{
{
[
dup
ascii-alpha?
]
[
reach
new-tag
(tag-name-state)
]
}
{
[
dup
33
=
]
[
drop
markup-declaration-open-state
]
}
{
[
dup
47
=
]
[
drop
end-tag-open-state
]
}
{
[
dup
63
=
]
[
drop
pick
reset-temporary-buffer
processing-instruction-open-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
[
60
reach
emit-char
]
dip
(data-state)
]
}
cond
;