|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.aethersanctum.curlyml.Parser
public class Parser
The purpose of the Parser is to generate a stream of events to be handled by a ParseEventHandler. The Parser is dumb by design. It doesn't know about Documents. All it knows how to do is check syntax and create events for inteception by a ParseEventHandler (like, say a DocumentLoader, which knows how to create a Document from parse events).
Other kinds of ParseEventHandlers might just process a stream of events and produce another stream without any kind of intermediate in-memory Document model. (e.g. a translator to convert CurlyML into HTML).
| Constructor Summary | |
|---|---|
Parser(java.io.Reader r,
ParseEventHandler handler)
create a new parser to parse the input from Reader r and send parse events to the handler. |
|
| Method Summary | |
|---|---|
java.lang.String |
join(java.util.List<java.lang.String> wordList)
join a list of words into a single string, delimited by spaces. |
protected int |
parseBlock(int depth)
parse a block in the document. |
void |
parseInput()
Performs the entire parsing process. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Parser(java.io.Reader r,
ParseEventHandler handler)
r - handler - parseInput()| Method Detail |
|---|
public void parseInput()
throws java.io.IOException,
SyntaxException
java.io.IOException
SyntaxExceptionpublic java.lang.String join(java.util.List<java.lang.String> wordList)
wordList -
protected int parseBlock(int depth)
throws java.io.IOException,
SyntaxException
depth -
java.io.IOException
SyntaxException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||