Class Parser
Lexer
com.opensymphony.module.sitemesh.html.tokenizer.Parser
public class Parser
extends Lexer
Looks for patterns of tokens in the Lexer and translates these to calls to pass to the TokenHandler.
- Author:
- Joe Walnes
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CharArraystatic final shortstatic final shortprivate TokenHandlerprivate final char[]private intstatic final shortstatic final shortstatic final shortprivate Stringprivate intprivate Stringprivate intstatic final shortstatic final shortprivate final Parser.ReusableTokenstatic final shortstatic final shortprivate intstatic final shortstatic final short -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidprotected voidparsedAttribute(String name, String value, boolean quoted) protected voidprotected voidparsedText(int position, int length) private voidparseFullTag(int type, String name, int start) private voidparseTag(int type) private voidpushBack(int next) protected voidreportError(String message, int line, int column) private voidvoidstart()private Stringtext()
-
Field Details
-
attributeBuffer
-
reusableToken
-
pushbackToken
private int pushbackToken -
pushbackText
-
SLASH
public static final short SLASH- See Also:
-
WHITESPACE
public static final short WHITESPACE- See Also:
-
EQUALS
public static final short EQUALS- See Also:
-
QUOTE
public static final short QUOTE- See Also:
-
WORD
public static final short WORD- See Also:
-
TEXT
public static final short TEXT- See Also:
-
QUOTED
public static final short QUOTED- See Also:
-
LT
public static final short LT- See Also:
-
GT
public static final short GT- See Also:
-
LT_OPEN_MAGIC_COMMENT
public static final short LT_OPEN_MAGIC_COMMENT- See Also:
-
LT_CLOSE_MAGIC_COMMENT
public static final short LT_CLOSE_MAGIC_COMMENT- See Also:
-
input
private final char[] input -
handler
-
position
private int position -
length
private int length -
name
-
type
private int type
-
-
Constructor Details
-
Parser
-
-
Method Details
-
text
-
skipWhiteSpace
- Throws:
IOException
-
pushBack
private void pushBack(int next) -
start
public void start() -
parseTag
- Throws:
IOException
-
parseFullTag
- Throws:
IOException
-
parseAttribute
- Throws:
IOException
-
parsedText
protected void parsedText(int position, int length) -
parsedTag
-
parsedAttribute
-
reportError
-