|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface NexusBlockParser
Parses Nexus blocks. Each instance should parse tokens into events that can be fired at some kind of NexusBlockListener. An Abstract parser is provided from which all implementations should derive.
Nested Class Summary | |
---|---|
static class |
NexusBlockParser.Abstract
All block parsers should derive from this abstract parser. |
Field Summary | |
---|---|
static java.lang.String |
UNKNOWN_BLOCK
The name for an unknown block parser. |
Method Summary | |
---|---|
void |
beginComment()
Opening a comment tag. |
void |
commentText(java.lang.String comment)
Receiving free text inside a comment tag. |
void |
endBlock()
Notifies the parser that a block is ending. |
void |
endComment()
Closing a comment tag. |
void |
endTokenGroup()
Closing a line (semi-colon encountered). |
NexusBlockListener |
getBlockListener()
Obtain the listener for this parser. |
void |
parseToken(java.lang.String token)
Notifies the parser of the next token. |
void |
startBlock(java.lang.String blockName)
Notifies the parser that a new block is starting. |
boolean |
wantsBracketsAndBraces()
Does the listener want to know about brackets and braces as separate tokens? |
Field Detail |
---|
static final java.lang.String UNKNOWN_BLOCK
Method Detail |
---|
void startBlock(java.lang.String blockName)
blockName
- the name of the block.void endBlock()
void parseToken(java.lang.String token) throws ParseException
token
- the token to parse.
ParseException
- if the token is unparseable.void beginComment()
void endComment()
void endTokenGroup()
void commentText(java.lang.String comment) throws ParseException
comment
- the text of the comment.
ParseException
NexusBlockListener getBlockListener()
boolean wantsBracketsAndBraces()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |