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 CharArray
static final short
static final short
private TokenHandler
private final char[]
private int
static final short
static final short
static final short
private String
private int
private String
private int
static final short
static final short
private final Parser.ReusableToken
static final short
static final short
private int
static final short
static final short
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
protected void
parsedAttribute
(String name, String value, boolean quoted) protected void
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
void
start()
private String
text()
-
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
-