(processing-instruction-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


: (processing-instruction-open-state)
( document n/f string ch/f -- document n'/f string )
{
{
[ dup { [ ascii-alpha? ] [ 95 = ] } 1|| ]
[ (processing-instruction-target-state) ]
}
{
[ dup f = ]
[
drop
"eof-in-processing-instruction"
report-parse-error pick emit-eof
]
}
[
"invalid-first-character-of-processing-instruction-target"
report-parse-error
[ pick temporary-buffer>comment ] dip
(bogus-comment-state)
]
} cond ;