public class Parser
extends java.lang.Object
TagTokenizer| Modifier and Type | Class and Description |
|---|---|
class |
Parser.ReusableToken |
| Modifier and Type | Field and Description |
|---|---|
static int |
ELEMENT |
static short |
EQUALS |
static short |
GT |
static short |
LT |
static short |
LT_CLOSE_MAGIC_COMMENT |
static short |
LT_OPEN_MAGIC_COMMENT |
static short |
QUOTE |
static short |
QUOTED |
static short |
SLASH |
static short |
TEXT |
static short |
WHITESPACE |
static short |
WORD |
static int |
YYEOF
This character denotes the end of file
|
static int |
YYINITIAL
lexical states
|
| Constructor and Description |
|---|
Parser(char[] input,
TokenHandler handler) |
| Modifier and Type | Method and Description |
|---|---|
protected int |
column() |
protected int |
length() |
protected int |
line() |
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) |
protected int |
position() |
protected void |
reportError(java.lang.String message,
int line,
int column) |
protected void |
resetLexerState() |
void |
start() |
void |
yybegin(int newState)
Enters a new lexical state
|
char |
yycharat(int pos)
Returns the character at position pos from the
matched text.
|
void |
yyclose()
Closes the input stream.
|
int |
yylength()
Returns the length of the matched text region.
|
int |
yylex()
Resumes scanning until the next regular expression is matched,
the end of input is encountered or an I/O-Error occurs.
|
void |
yyreset(java.io.Reader reader)
Closes the current stream, and resets the
scanner to read from a new input stream.
|
int |
yystate()
Returns the current lexical state.
|
java.lang.String |
yytext()
Returns the text matched by the current regular expression.
|
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
public static final int YYEOF
public static final int YYINITIAL
public static final int ELEMENT
public Parser(char[] input,
TokenHandler handler)
public void start()
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)
protected int position()
protected int length()
protected int line()
protected int column()
protected void resetLexerState()
public final void yyclose()
throws java.io.IOException
java.io.IOExceptionpublic final void yyreset(java.io.Reader reader)
throws java.io.IOException
reader - the new input streamjava.io.IOExceptionpublic final int yystate()
public final void yybegin(int newState)
newState - the new lexical statepublic final java.lang.String yytext()
public final char yycharat(int pos)
pos - the position of the character to fetch.
A value from 0 to yylength()-1.public final int yylength()
public int yylex()
throws java.io.IOException
IOException - if any I/O-Error occurs