|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjodd.lagarto.LagartoParser
public class LagartoParser
Parses HTML text and invokes TagVisitor.
| Constructor Summary | |
|---|---|
LagartoParser(char[] charArray)
|
|
LagartoParser(java.nio.CharBuffer input)
|
|
LagartoParser(java.lang.CharSequence charSequence)
|
|
| Method Summary | |
|---|---|
protected void |
_parse()
Main parsing loop that process lexer tokens. |
protected boolean |
acceptTag(java.lang.String tagName)
Returns true if some tag has to be parsed. |
protected void |
error(java.lang.String message)
Prepares error message and reports it to the visitor. |
protected void |
flushText()
Flushes buffered text and stops buffering. |
protected Token |
nextToken()
Returns the next token from lexer or previously fetched token. |
void |
parse(TagVisitor visitor)
Parses provided content using HTML style. |
void |
parse(TagVisitor visitor,
boolean parseHtmlStyle)
Parses provided content. |
protected void |
parseAttribute()
Parses single attribute. |
protected void |
parseCCEnd()
Parses conditional comment end. |
protected void |
parseCCStart()
Parses conditional comment start. |
protected void |
parseCDATA()
Parses CDATA. |
protected void |
parseComment()
Parses HTML comments. |
protected void |
parseDoctype()
Parses HTML DOCTYPE directive. |
protected void |
parseSpecialTag(int state)
Parses special tags. |
protected void |
parseTag(Token tagToken,
TagType type)
Parse tag starting from "<". |
protected void |
parseTagAndAttributes(Token tagToken,
java.lang.String tagName,
TagType type,
int start)
Parses full tag. |
protected void |
parseText(int start,
int end)
Buffers the parsed text. |
protected void |
skipWhiteSpace()
Skips all whitespace tokens. |
protected java.lang.CharSequence |
text()
Returns current text. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LagartoParser(char[] charArray)
public LagartoParser(java.lang.CharSequence charSequence)
public LagartoParser(java.nio.CharBuffer input)
| Method Detail |
|---|
public void parse(TagVisitor visitor)
public void parse(TagVisitor visitor,
boolean parseHtmlStyle)
protected void _parse()
throws java.io.IOException
java.io.IOExceptionprotected void flushText()
protected void parseText(int start,
int end)
flushText().
protected void parseComment()
throws java.io.IOException
java.io.IOException
protected void parseCDATA()
throws java.io.IOException
java.io.IOException
protected void parseDoctype()
throws java.io.IOException
java.io.IOException
protected void parseCCStart()
throws java.io.IOException
java.io.IOException
protected void parseCCEnd()
throws java.io.IOException
java.io.IOException
protected void parseTag(Token tagToken,
TagType type)
throws java.io.IOException
java.io.IOExceptionprotected boolean acceptTag(java.lang.String tagName)
true if some tag has to be parsed.
User may override this method to gain more control over what should be parsed.
May be used in situations where only few specific tags has to be parsed
(e.g. just title and body).
protected void parseTagAndAttributes(Token tagToken,
java.lang.String tagName,
TagType type,
int start)
throws java.io.IOException
java.io.IOException
protected void parseAttribute()
throws java.io.IOException
java.io.IOException
protected void parseSpecialTag(int state)
throws java.io.IOException
java.io.IOException
protected Token nextToken()
throws java.io.IOException
java.io.IOException
protected void skipWhiteSpace()
throws java.io.IOException
java.io.IOExceptionprotected java.lang.CharSequence text()
protected void error(java.lang.String message)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||