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.

フィールドの概要
 Token jj_nt
           
protected  org.seasar.tuigwaa.cms.core.wiki.engine.JJTWikiParserState jjtree
           
 boolean lookingAhead
           
 Token token
           
 WikiParserTokenManager token_source
           
 
インタフェース 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
 
コンストラクタの概要
WikiParser()
           
WikiParser(InputStream stream)
           
WikiParser(Reader stream)
           
WikiParser(WikiParserTokenManager tm)
           
 
メソッドの概要
 int addAnnotation(SimpleNode node)
           
 int addTOC(SimpleNode node)
           
 void Align()
           
 void Annotation()
           
 void AnyOther()
           
 void Args()
           
 void Blankline()
           
 void BlockElement()
           
 void BlockPlugin()
           
 void CSVTable()
           
 void DefineList()
           
 void Deleteline()
           
 void disable_tracing()
           
 void enable_tracing()
           
 void Errors()
           
 void Excerpt()
           
 void FloatAlign()
           
 ParseException generateParseException()
           
 void GenerateTree()
           
protected  String getErrorLine()
           
 Token getNextToken()
           
 int getNLexicalErrors()
           
 int getNParseErrors()
           
 Token getToken(int index)
           
 void Heading()
           
 void Horizontalline()
           
protected  void initStartPosition()
           
 void InlineElement()
           
 void InlinePlugin()
           
protected  boolean isAlign()
           
protected  boolean isBlankline()
           
protected  boolean isBlockPlugin()
           
protected  boolean isChangeStateBlockElement(int type)
           
protected  boolean isCSVTable()
           
protected  boolean isDefineList()
           
protected  boolean isExcerpt()
           
protected  boolean isFloatAlign()
           
protected  boolean isHeading()
           
protected  boolean isHorizontalline()
           
protected  boolean isList()
           
protected  boolean isNewline(int pos)
           
protected  boolean isNormalBlockElement(int[] types)
           
protected  boolean isParagraph()
           
protected  boolean isPreshaped()
           
protected  boolean isTable()
           
 void Letters()
           
 void Linker()
           
 void List()
           
 void Paragraph()
           
 void Preshaped()
           
 void ReInit(InputStream stream)
           
 void ReInit(Reader stream)
           
 void ReInit(WikiParserTokenManager tm)
           
protected  void setStartPosition()
          Setting current buffer position of JavaCharacterStream for error recovery.
 void StrongItalic()
           
 void Table()
           
 
クラス 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.