public class Parser
extends Lexer
TagTokenizer
Modifier and Type | Class and Description |
---|---|
class |
Parser.ReusableToken |
Modifier and Type | Field and Description |
---|---|
private CharArray |
attributeBuffer |
static short |
EQUALS |
static short |
GT |
private TokenHandler |
handler |
private char[] |
input |
private int |
length |
static short |
LT |
static short |
LT_CLOSE_MAGIC_COMMENT |
static short |
LT_OPEN_MAGIC_COMMENT |
private String |
name |
private int |
position |
private String |
pushbackText |
private int |
pushbackToken |
static short |
QUOTE |
static short |
QUOTED |
private Parser.ReusableToken |
reusableToken |
static short |
SLASH |
static short |
TEXT |
private int |
type |
static short |
WHITESPACE |
static short |
WORD |
Constructor and Description |
---|
Parser(char[] input,
TokenHandler handler) |
Modifier and Type | Method and Description |
---|---|
private void |
parseAttribute() |
protected void |
parsedAttribute(String name,
String value,
boolean quoted) |
protected void |
parsedTag(int type,
String name,
int start,
int length) |
protected void |
parsedText(int position,
int length) |
private void |
parseFullTag(int type,
String name,
int start) |
private void |
parseTag(int type) |
private void |
pushBack(int next) |
protected void |
reportError(String message,
int line,
int column) |
private void |
skipWhiteSpace() |
void |
start() |
private String |
text() |
private final CharArray attributeBuffer
private final Parser.ReusableToken reusableToken
private int pushbackToken
private String pushbackText
public static final short SLASH
public static final short WHITESPACE
public static final short EQUALS
public static final short QUOTE
public static final short WORD
public static final short TEXT
public static final short QUOTED
public static final short LT
public static final short GT
public static final short LT_OPEN_MAGIC_COMMENT
public static final short LT_CLOSE_MAGIC_COMMENT
private final char[] input
private TokenHandler handler
private int position
private int length
private String name
private int type
public Parser(char[] input, TokenHandler handler)
private String text()
private void skipWhiteSpace() throws IOException
IOException
private void pushBack(int next)
public void start()
private void parseTag(int type) throws IOException
IOException
private void parseFullTag(int type, String name, int start) throws IOException
IOException
private void parseAttribute() throws IOException
IOException
protected void parsedText(int position, int length)
protected void parsedTag(int type, String name, int start, int length)
protected void reportError(String message, int line, int column)