|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gate.yam.parse.YamParser
public class YamParser
A parser for YAM.
Field Summary | |
---|---|
Token |
jj_nt
|
protected gate.yam.parse.JJTYamParserState |
jjtree
|
boolean |
lookingAhead
|
Token |
token
|
YamParserTokenManager |
token_source
|
Fields inherited from interface gate.yam.parse.YamParserTreeConstants |
---|
JJTANCHOR, JJTBR, JJTCOLUMN, JJTCONTENTS, JJTCONTROL, JJTESCAPE, JJTHR, JJTLIST, JJTLISTITEM, JJTNBSP, jjtNodeName, JJTOLIST, JJTPARAGRAPH, JJTPLAIN, JJTPREDICATE, JJTROW, JJTSECTIONHEAD, JJTSECTIONTEXT, JJTSEP, JJTTABLE, JJTTABLESEP, JJTTARGETCONTROL, JJTTEXT, JJTTEXTORTABLE, JJTTITLE, JJTULIST, JJTUNIT, JJTURL, JJTVERBATIM, JJTWHSP, JJTWORD, JJTYAMDOCUMENT |
Fields inherited from interface gate.yam.parse.YamParserConstants |
---|
amp, ANCHOR, anchorBody, anchorStart, anysp, bold, br, bslash, COMMENT, commentChars, contents, DEFAULT, dummy, EOF, escape, hr, it, levelNum, listItemStart, lt, multiLineCommentEnd, multiLineCommentStart, nbsp, nl, plain, PRED, predArg, predArgSep, predEnd, predStart, quote, sectionLevel, sep, singleLineComment, sp, tableEnd, tableRowStart, tableSep, tableStart, tokenImage, tt, under, urlBodyToRrbrOrComma, urlBodyToSpace, urlComma, URLPERCENT, urlPercentStart, URLPLAIN, urlPlainStart, urlRrbr, urlText, verbAny, VERBATIM, verbEnd, verbEscape, verbStart |
Constructor Summary | |
---|---|
YamParser(InputStream stream)
|
|
YamParser(InputStream stream,
String encoding)
|
|
YamParser(Reader stream)
|
|
YamParser(YamParserTokenManager tm)
|
Method Summary | |
---|---|
void |
Anchor()
|
void |
Br()
|
void |
Contents()
|
void |
Control()
|
void |
disable_tracing()
|
void |
enable_tracing()
|
void |
Escape()
|
ParseException |
generateParseException()
|
Token |
getNextToken()
|
int |
getSepSpacing(Token sep)
Returns the length of the trailing spaces on a sep token (the spaces at the start of the next line). |
Token |
getToken(int index)
|
void |
Hr()
|
void |
List()
|
void |
Nbsp()
|
void |
OList()
|
void |
Paragraph()
|
YamParseTree |
parse()
Perform parsing, and handle errors not dealt with in the grammar. |
YamParseTree |
parse(boolean titleIsHeading,
boolean ignoreTitle,
int headingIncrement,
boolean doIncludes)
Perform parsing, and handle errors not dealt with in the grammar. |
void |
Plain()
|
void |
Predicate()
|
void |
ReInit(InputStream stream)
|
void |
ReInit(InputStream stream,
String encoding)
|
void |
ReInit(Reader stream)
|
void |
ReInit(YamParserTokenManager tm)
|
void |
Row(String[] rowSpacing)
|
void |
SectionHead()
|
void |
SectionText()
|
int |
Sep()
|
void |
setDoIncludes(boolean b)
Should we process included files or not? |
void |
setIOHandler(IOHandler ioh)
Set the parser's IOHandler. |
void |
Table()
|
String[] |
TableSep()
|
void |
TargetControl()
|
void |
Text()
|
void |
TextOrTable()
|
void |
Title()
|
void |
UList()
|
void |
Unit()
|
void |
Url()
|
void |
Verbatim()
|
void |
Whsp()
|
void |
Word()
|
void |
YamDocument()
Top-level parser goal. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected gate.yam.parse.JJTYamParserState jjtree
public YamParserTokenManager token_source
public Token token
public Token jj_nt
public boolean lookingAhead
Constructor Detail |
---|
public YamParser(InputStream stream)
public YamParser(InputStream stream, String encoding)
public YamParser(Reader stream)
public YamParser(YamParserTokenManager tm)
Method Detail |
---|
public YamParseTree parse() throws gate.util.GateException
gate.util.GateException
public YamParseTree parse(boolean titleIsHeading, boolean ignoreTitle, int headingIncrement, boolean doIncludes) throws gate.util.GateException
titleIsHeading
- When we're including a file, the title is treated as a heading.ignoreTitle
- When we're recovering from an error don't look for a title.headingIncrement
- How much to increment heading levels (in an included file).doIncludes
- Should we process included files?
gate.util.GateException
public void setDoIncludes(boolean b)
public void setIOHandler(IOHandler ioh)
public int getSepSpacing(Token sep)
public final void YamDocument() throws ParseException
ParseException
public final int Sep() throws ParseException
ParseException
public final void Title() throws ParseException
ParseException
public final void Text() throws ParseException
ParseException
public final void Verbatim() throws ParseException
ParseException
public final void Word() throws ParseException
ParseException
public final void Escape() throws ParseException
ParseException
public final void Plain() throws ParseException
ParseException
public final void Control() throws ParseException
ParseException
public final void TargetControl() throws ParseException
ParseException
public final void Hr() throws ParseException
ParseException
public final void Url() throws ParseException
ParseException
public final void Anchor() throws ParseException
ParseException
public final void Br() throws ParseException
ParseException
public final void Nbsp() throws ParseException
ParseException
public final void Unit() throws ParseException
ParseException
public final void SectionHead() throws ParseException
ParseException
public final void SectionText() throws ParseException
ParseException
public final void Paragraph() throws ParseException
ParseException
public final void List() throws ParseException
ParseException
public final void OList() throws ParseException
ParseException
public final void UList() throws ParseException
ParseException
public final void Table() throws ParseException
ParseException
public final void Row(String[] rowSpacing) throws ParseException
ParseException
public final String[] TableSep() throws ParseException
ParseException
public final void Whsp() throws ParseException
ParseException
public final void Contents() throws ParseException
ParseException
public final void Predicate() throws ParseException
ParseException
public final void TextOrTable() throws ParseException
ParseException
public void ReInit(InputStream stream)
public void ReInit(InputStream stream, String encoding)
public void ReInit(Reader stream)
public void ReInit(YamParserTokenManager tm)
public final Token getNextToken()
public final Token getToken(int index)
public ParseException generateParseException()
public final void enable_tracing()
public final void disable_tracing()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |