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 java.lang.String |
name |
private int |
position |
private java.lang.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,
int length,
TokenHandler handler) |
Modifier and Type | Method and Description |
---|---|
private void |
parseAttribute() |
protected void |
parsedAttribute(java.lang.String name,
java.lang.String value,
boolean quoted) |
protected void |
parsedTag(int type,
java.lang.String name,
int start,
int length) |
protected void |
parsedText(int position,
int length) |
private void |
parseFullTag(int type,
java.lang.String name,
int start) |
private void |
parseTag(int type) |
private void |
pushBack(int next) |
protected void |
reportError(java.lang.String message,
int line,
int column) |
private void |
skipWhiteSpace() |
void |
start() |
private java.lang.String |
text() |
private final CharArray attributeBuffer
private final Parser.ReusableToken reusableToken
private int pushbackToken
private java.lang.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 java.lang.String name
private int type
public Parser(char[] input, int length, TokenHandler handler)
private java.lang.String text()
private void skipWhiteSpace() throws java.io.IOException
java.io.IOException
private void pushBack(int next)
public void start()
private void parseTag(int type) throws java.io.IOException
java.io.IOException
private void parseFullTag(int type, java.lang.String name, int start) throws java.io.IOException
java.io.IOException
private void parseAttribute() throws java.io.IOException
java.io.IOException
protected void parsedText(int position, int length)
protected void parsedTag(int type, java.lang.String name, int start, int length)
protected void parsedAttribute(java.lang.String name, java.lang.String value, boolean quoted)
protected void reportError(java.lang.String message, int line, int column)