package hotsax.html.sax;
/*
* Yytoken, holds the latest token from the lexer
*/
class Yytoken {
public int m_index;
public String m_text;
public final static int UNDEFINED = HtmlParser.UNDEFINED; // represents an error or uninitialized token
public final static int SOF =HtmlParser.SOF; // start of file
public final static int TAG_START =HtmlParser.TAG_START;
public final static int TAG_END = HtmlParser.TAG_END;
public final static int TAG_EMPTY = HtmlParser.TAG_EMPTY;
public final static int ATTR = HtmlParser.ATTR;
public final static int VAL = HtmlParser.VAL;
public final static int TEXT = HtmlParser.TEXT;
public final static int COMMENT = HtmlParser.COMMENT;
public final static int PI = HtmlParser.PI;
public final static int DOCTYPE = HtmlParser.DOCTYPE;
public final static int CDATA = HtmlParser.CDATA;
public final static int TAG_START_COMPLETE = HtmlParser.TAG_START_COMPLETE; // represents trailing ">" indicating all attrs collected
public final static int EOF = HtmlParser.EOF;
Yytoken (int index, String text) {
m_index = index;
m_text = text;
}
/*
private String types[] = {
"UNDEFINED", "SOF", "TAG_START", "TAG_END", "TAG_EMPTY"
, "ATTR", "VAL", "TEXT", "COMMENT", "PI"
, "DOCTYPE", "CDATA", "TAG_START_COMPLETE"
, "EOF"};
*/
public String toString() {
return ": |"+m_text+ "| type(" + m_index + "):" + HtmlParser.yyname[m_index];
}
}
|