org.seasar.tuigwaa.cms.core.wiki.engine
クラス WikiParser
java.lang.Object
org.seasar.tuigwaa.cms.core.wiki.engine.WikiParser
- すべての実装インタフェース:
- WikiParserConstants, WikiParserTreeConstants
- public class WikiParser
- extends Object
- implements WikiParserTreeConstants, WikiParserConstants
- 作成者:
- someda
NOT TO IMPLMENT: (2005/10)
- Table format ('h','c', at the end of table line)
- Interwiki
NOTE:
- Token Specification Policy
Token is defined as simple as possible.
As the lexical tips (https://javacc.dev.java.net/doc/lexertips.html) says,
the complex RE in token definition is avoided as much as possible,
otherwise most of such jobs will be done by parser using LOOKAHEAD.
- ParseException Handling Policy
In GenerateTree(),BlockElement() and InlineElement(),
ParseException will be caught, that is 3-level error handling.
The one caught in GenerateTree() is thought as Fatal Exception,
because syntax error should be caught in try-catch clause of
BlockElement() or InlineElement().
In BlockElement(), when exception occurs, it will proceed
TokenManager consumption until next newline token will apear,
as to InlineElement it'll do nothing about TokenManager.
During exception handling in both BlockElement() and InlineElement(),
it pushes WikiErrors node on top of the stack for not losing
error position itself.
NT Errors() is just only for this purpose and will not be generated
during regular parsing.
インタフェース org.seasar.tuigwaa.cms.core.wiki.engine.WikiParserTreeConstants から継承したフィールド |
JJTALIAS, JJTALIGN, JJTANNOTATION, JJTANYOTHER, JJTARGS, JJTBLOCKPLUGIN, JJTCSVTABLE, JJTDEFINEDWORD, JJTDEFINELIST, JJTDELETELINE, JJTERRORS, JJTEXCERPT, JJTEXPLANATIONWORD, JJTFLOATALIGN, JJTGENERATETREE, JJTHEADING, JJTHORIZONTALLINE, JJTINLINEPLUGIN, JJTINTERWIKI, JJTLETTERS, JJTLINK, JJTLIST, JJTLISTMEMBER, jjtNodeName, JJTPAGENAME, JJTPARAGRAPH, JJTPRESHAPED, JJTSKIPTONEWLINE, JJTSTRONGITALIC, JJTSYNTAXERROR, JJTTABLE, JJTTABLECOLUMN, JJTTABLEMEMBER, JJTVOID |
インタフェース org.seasar.tuigwaa.cms.core.wiki.engine.WikiParserConstants から継承したフィールド |
ALIAS, ALIASLINK, ALIGN1, ALIGN2, ALIGN3, ALPHABET, ANCHOR, ANCHORNAME, ANYOTHER, ARGS, BGCOLORWORD, BLOCKPLUGIN, COLON, COLORWORD, COLSPAN, COMMA, CTAB, CTABLE, CTABLEDEL, DEFAULT, DELETELINE, DIGIT, DLIST, EMAIL, EOF, EXCERPT1, EXCERPT2, EXCERPT3, FALIGN1, FALIGN2, HEADING1, HEADING2, HEADING3, HEX, HORIZONTAL, HOSTNAME, IDENTIFIER, INLINEPLUGIN, INTERWIKI, LBRACE, LBRACKET, LINK, LIST1, LIST2, LIST3, LPAREN, LT, NAME, NATIVELINK, NL, NLIST1, NLIST2, NLIST3, NOASCII, NTAB, NTABCOLSPAN, NTABROWSPAN, PAGENAME, PIPE, PLUGINARG, PLUGINNAME, PRESHAPED, RBRACE, RBRACKET, RPAREN, SEMICOLON, SIZEWORD, SLASH, STRONGITALIC, TABLE, TABLEDEL, TILDE, tokenImage, URL, WIKINAME |
クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
jjtree
protected org.seasar.tuigwaa.cms.core.wiki.engine.JJTWikiParserState jjtree
token_source
public WikiParserTokenManager token_source
token
public Token token
jj_nt
public Token jj_nt
lookingAhead
public boolean lookingAhead
WikiParser
public WikiParser()
WikiParser
public WikiParser(InputStream stream)
WikiParser
public WikiParser(Reader stream)
WikiParser
public WikiParser(WikiParserTokenManager tm)
addAnnotation
public int addAnnotation(SimpleNode node)
addTOC
public int addTOC(SimpleNode node)
getNParseErrors
public int getNParseErrors()
getNLexicalErrors
public int getNLexicalErrors()
setStartPosition
protected void setStartPosition()
- Setting current buffer position of JavaCharacterStream
for error recovery.
JavaCharacterStream uses ring buffer to store the character
stream inside its instance.
initStartPosition
protected void initStartPosition()
getErrorLine
protected String getErrorLine()
isBlankline
protected boolean isBlankline()
isParagraph
protected boolean isParagraph()
isNormalBlockElement
protected boolean isNormalBlockElement(int[] types)
isChangeStateBlockElement
protected boolean isChangeStateBlockElement(int type)
isExcerpt
protected boolean isExcerpt()
isList
protected boolean isList()
isDefineList
protected boolean isDefineList()
isPreshaped
protected boolean isPreshaped()
isTable
protected boolean isTable()
isCSVTable
protected boolean isCSVTable()
isHeading
protected boolean isHeading()
isAlign
protected boolean isAlign()
isFloatAlign
protected boolean isFloatAlign()
isHorizontalline
protected boolean isHorizontalline()
isBlockPlugin
protected boolean isBlockPlugin()
isNewline
protected boolean isNewline(int pos)
GenerateTree
public final void GenerateTree()
throws ParseException
- 例外:
ParseException
BlockElement
public final void BlockElement()
throws ParseException
- 例外:
ParseException
InlineElement
public final void InlineElement()
throws ParseException
- 例外:
ParseException
Paragraph
public final void Paragraph()
throws ParseException
- 例外:
ParseException
Excerpt
public final void Excerpt()
throws ParseException
- 例外:
ParseException
List
public final void List()
throws ParseException
- 例外:
ParseException
DefineList
public final void DefineList()
throws ParseException
- 例外:
ParseException
Preshaped
public final void Preshaped()
throws ParseException
- 例外:
ParseException
Table
public final void Table()
throws ParseException
- 例外:
ParseException
CSVTable
public final void CSVTable()
throws ParseException
- 例外:
ParseException
Heading
public final void Heading()
throws ParseException
- 例外:
ParseException
Align
public final void Align()
throws ParseException
- 例外:
ParseException
FloatAlign
public final void FloatAlign()
throws ParseException
- 例外:
ParseException
Horizontalline
public final void Horizontalline()
throws ParseException
- 例外:
ParseException
Blankline
public final void Blankline()
throws ParseException
- 例外:
ParseException
BlockPlugin
public final void BlockPlugin()
throws ParseException
- 例外:
ParseException
Letters
public final void Letters()
throws ParseException
- 例外:
ParseException
AnyOther
public final void AnyOther()
throws ParseException
- 例外:
ParseException
StrongItalic
public final void StrongItalic()
throws ParseException
- 例外:
ParseException
Deleteline
public final void Deleteline()
throws ParseException
- 例外:
ParseException
Annotation
public final void Annotation()
throws ParseException
- 例外:
ParseException
Linker
public final void Linker()
throws ParseException
- 例外:
ParseException
InlinePlugin
public final void InlinePlugin()
throws ParseException
- 例外:
ParseException
Args
public final void Args()
throws ParseException
- 例外:
ParseException
Errors
public final void Errors()
throws ParseException
- 例外:
ParseException
ReInit
public void ReInit(InputStream stream)
ReInit
public void ReInit(Reader stream)
ReInit
public void ReInit(WikiParserTokenManager tm)
getNextToken
public final Token getNextToken()
getToken
public final Token getToken(int index)
generateParseException
public ParseException generateParseException()
enable_tracing
public final void enable_tracing()
disable_tracing
public final void disable_tracing()
Copyright © 2005-2006 The Seasar Foundation and the others.. All Rights Reserved.