This class takes a text stream and produces a sequence of HTML tokens. It requires its source stream to support #peek.
nextChar
peekChar
initialize:
nextAttributeValue
return the next sequence of alphanumeric characters; used to read in the value part of a tag's attribute, ie <tagname attribname=attribvalue>
nextComment
we've seen < and the next is a !. read until the whole comment is done
nextName
return the next sequence of alphanumeric characters
nextSpaces
read in as many consecutive space characters as possible
nextTag
we've seen a < and peek-ed something other than a !. Parse and return a tag
nextTagOrComment
next character is a $<. So read either a tag or a token
nextText
returns the next textual segment
skipSpaces
skip as many consecutive space characters as possible
atEnd
are there any more tokens? This is equivalent to whether there is any more input
next
return the next HtmlToken, or nil if there are no more
initialize
HtmlTokenizer initialize
on: