Package com.opensymphony.module.sitemesh.html.tokenizer

# 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:
  - `TagTokenizer`

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`class`
`Parser.ReusableToken`

## Field Summary

Fields
Modifier and Type
Field
Description
`private final CharArray`
`attributeBuffer`
`static final short`
`EQUALS`
`static final short`
`GT`
`private TokenHandler`
`handler`
`private final char[]`
`input`
`private int`
`length`
`static final short`
`LT`
`static final short`
`LT_CLOSE_MAGIC_COMMENT`
`static final short`
`LT_OPEN_MAGIC_COMMENT`
`private String`
`name`
`private int`
`position`
`private String`
`pushbackText`
`private int`
`pushbackToken`
`static final short`
`QUOTE`
`static final short`
`QUOTED`
`private final Parser.ReusableToken`
`reusableToken`
`static final short`
`SLASH`
`static final short`
`TEXT`
`private int`
`type`
`static final short`
`WHITESPACE`
`static final short`
`WORD`

## Constructor Summary

Constructors
Constructor
Description
`Parser(char[] input, TokenHandler handler)`

## Method Summary

Modifier and Type
Method
Description
`private void`
`parseAttribute()`
`protected void`
`parsedAttribute(String name, String value, boolean quoted)`
`protected void`
`parsedTag(int type, String name, int start, int length)`
`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`
`skipWhiteSpace()`
`void`
`start()`
`private String`
`text()`

## Field Details

### attributeBuffer

private final CharArray attributeBuffer

### reusableToken

private final Parser.ReusableToken reusableToken

### pushbackToken

private int pushbackToken

### pushbackText

private String pushbackText

### SLASH

public static final short SLASH

See Also:
  - Constant Field Values

### WHITESPACE

public static final short WHITESPACE

See Also:
  - Constant Field Values

### EQUALS

public static final short EQUALS

See Also:
  - Constant Field Values

### QUOTE

public static final short QUOTE

See Also:
  - Constant Field Values

### WORD

public static final short WORD

See Also:
  - Constant Field Values

### TEXT

public static final short TEXT

See Also:
  - Constant Field Values

### QUOTED

public static final short QUOTED

See Also:
  - Constant Field Values

### LT

public static final short LT

See Also:
  - Constant Field Values

### GT

public static final short GT

See Also:
  - Constant Field Values

### LT_OPEN_MAGIC_COMMENT

public static final short LT_OPEN_MAGIC_COMMENT

See Also:
  - Constant Field Values

### LT_CLOSE_MAGIC_COMMENT

public static final short LT_CLOSE_MAGIC_COMMENT

See Also:
  - Constant Field Values

### input

private final char[] input

### handler

private TokenHandler handler

### position

private int position

### length

private int length

### name

private String name

### type

private int type

## Constructor Details

### Parser

public Parser(char[] input, TokenHandler handler)

## Method Details

### text

private String text()

### skipWhiteSpace

private void skipWhiteSpace() throws IOException

Throws:
  `IOException`

### pushBack

private void pushBack(int next)

### start

public void start()

### parseTag

private void parseTag(int type) throws IOException

Throws:
  `IOException`

### parseFullTag

private void parseFullTag(int type, String name, int start) throws IOException

Throws:
  `IOException`

### parseAttribute

private void parseAttribute() throws IOException

Throws:
  `IOException`

### parsedText

protected void parsedText(int position, int length)

### parsedTag

protected void parsedTag(int type, String name, int start, int length)

### parsedAttribute

protected void parsedAttribute(String name, String value, boolean quoted)

### reportError

protected void reportError(String message, int line, int column)