|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object antlr.CharScanner gate.wiki.antlr.YAMLexer
public abstract class YAMLexer
Parse and translate YAM input. All lexers for an input and included text share the same context but each lexer can have their own translator target. Most functionality is in the DefaultYAMEngine.
Field Summary | |
---|---|
static antlr.collections.impl.BitSet |
_tokenSet_0
|
static antlr.collections.impl.BitSet |
_tokenSet_1
|
static antlr.collections.impl.BitSet |
_tokenSet_10
|
static antlr.collections.impl.BitSet |
_tokenSet_11
|
static antlr.collections.impl.BitSet |
_tokenSet_12
|
static antlr.collections.impl.BitSet |
_tokenSet_13
|
static antlr.collections.impl.BitSet |
_tokenSet_14
|
static antlr.collections.impl.BitSet |
_tokenSet_15
|
static antlr.collections.impl.BitSet |
_tokenSet_16
|
static antlr.collections.impl.BitSet |
_tokenSet_17
|
static antlr.collections.impl.BitSet |
_tokenSet_18
|
static antlr.collections.impl.BitSet |
_tokenSet_19
|
static antlr.collections.impl.BitSet |
_tokenSet_2
|
static antlr.collections.impl.BitSet |
_tokenSet_3
|
static antlr.collections.impl.BitSet |
_tokenSet_4
|
static antlr.collections.impl.BitSet |
_tokenSet_5
|
static antlr.collections.impl.BitSet |
_tokenSet_6
|
static antlr.collections.impl.BitSet |
_tokenSet_7
|
static antlr.collections.impl.BitSet |
_tokenSet_8
|
static antlr.collections.impl.BitSet |
_tokenSet_9
|
protected YAMContext |
context
Tracks variables and such; later track line number etc... |
protected boolean |
inTable
Can't do some things in tables like bullet lists |
protected boolean |
inTitle
|
YAMTarget |
target
Each lexer/translator can have it's own target language |
Fields inherited from class antlr.CharScanner |
---|
_returnToken, caseSensitive, caseSensitiveLiterals, commitToPath, EOF_CHAR, hashString, inputState, literals, saveConsumedInput, tabsize, text, tokenObjectClass, traceDepth |
Fields inherited from interface gate.wiki.antlr.YAMLexerTokenTypes |
---|
ANCHOR, ARG, ARGLIST, BLANK, BLANK_LINE_THEN_MARKUP, BLOCKQUOTE, BOLD, BR, CODE, COL_SEP, END_TABLE, EOF, ESC, ESC2, ID, INQUOTE, ITALIC, LEFT_EDGE_MARKUP, LEVEL, LINE_START_THEN_MARKUP, LINK, LONGDASH, NESTED_PAREN, NOT_SPECIAL_CHAR, NULL_TREE_LOOKAHEAD, PLUGIN, ROW_SEP, SECTION, STRING, TABLE, TEXT, TEXT_TIL_END_ARG, TITLE, TOP_PAREN, TT, WS, WS2 |
Constructor Summary | |
---|---|
YAMLexer(antlr.InputBuffer ib)
|
|
YAMLexer(InputStream in)
|
|
YAMLexer(antlr.LexerSharedInputState state)
|
|
YAMLexer(Reader in)
|
|
YAMLexer(Reader in,
YAMContext context)
Used by sublexers that handle plugin data; shares context with original |
Method Summary | |
---|---|
protected abstract void |
captureText()
|
protected abstract void |
closeAllLists()
|
protected abstract void |
closeAllLists(int level)
|
protected abstract void |
closeList()
|
protected abstract void |
closeSectionsToLevel(int level)
|
protected abstract void |
define(String id,
String value)
|
YAMContext |
getContext()
|
YAMTarget |
getTarget()
|
void |
mANCHOR(boolean _createToken)
An anchor is a # followed by an ID |
protected void |
mARG(boolean _createToken)
|
protected Vector |
mARGLIST(boolean _createToken)
|
void |
mBLANK_LINE_THEN_MARKUP(boolean _createToken)
|
void |
mBLANK(boolean _createToken)
|
protected void |
mBLOCKQUOTE(boolean _createToken)
|
void |
mBOLD(boolean _createToken)
|
void |
mBR(boolean _createToken)
|
protected void |
mCODE(boolean _createToken)
|
void |
mCOL_SEP(boolean _createToken)
|
protected void |
mEND_TABLE(boolean _createToken)
|
void |
mESC(boolean _createToken)
|
protected void |
mESC2(boolean _createToken)
|
protected void |
mID(boolean _createToken)
|
protected void |
mINQUOTE(boolean _createToken)
|
void |
mITALIC(boolean _createToken)
|
protected void |
mLEFT_EDGE_MARKUP(boolean _createToken)
|
protected void |
mLEVEL(boolean _createToken)
|
void |
mLINE_START_THEN_MARKUP(boolean _createToken)
|
void |
mLINK(boolean _createToken)
A link looks like %(url,title) or %(url), which is same as http://foo.com. |
void |
mLONGDASH(boolean _createToken)
|
protected void |
mNESTED_PAREN(boolean _createToken)
|
protected void |
mNOT_SPECIAL_CHAR(boolean _createToken)
|
void |
mPLUGIN(boolean _createToken)
|
void |
mROW_SEP(boolean _createToken)
|
protected void |
mSECTION(boolean _createToken)
|
protected void |
mSTRING(boolean _createToken)
|
protected void |
mTABLE(boolean _createToken)
|
protected void |
mTEXT_TIL_END_ARG(boolean _createToken)
|
protected void |
mTEXT(boolean _createToken)
The catch-all "else" rule. |
void |
mTITLE(boolean _createToken)
First line of outermost file (stdin usually) is title |
protected void |
mTOP_PAREN(boolean _createToken)
|
void |
mTT(boolean _createToken)
|
protected void |
mWS(boolean _createToken)
|
protected void |
mWS2(boolean _createToken)
|
antlr.Token |
nextToken()
|
protected abstract void |
ol(int level)
|
protected abstract void |
plugin(String id,
Vector args)
|
protected abstract void |
section(String text,
int level)
|
void |
setContext(YAMContext context)
|
protected abstract void |
title(String title)
|
abstract void |
translate(YAMTarget target)
Begin on-the-fly syntax-directed translation |
protected abstract void |
ul(int level)
|
protected abstract void |
variable(String id)
|
Methods inherited from class antlr.CharScanner |
---|
append, append, commit, consume, consumeUntil, consumeUntil, getCaseSensitive, getCaseSensitiveLiterals, getColumn, getCommitToPath, getFilename, getInputBuffer, getInputState, getLine, getTabSize, getText, getTokenObject, LA, makeToken, mark, match, match, match, matchNot, matchRange, newline, panic, panic, reportError, reportError, reportWarning, resetText, rewind, setCaseSensitive, setColumn, setCommitToPath, setFilename, setInputState, setLine, setTabSize, setText, setTokenObjectClass, tab, testLiteralsTable, testLiteralsTable, toLower, traceIn, traceIndent, traceOut, uponEOF |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected YAMContext context
public YAMTarget target
protected boolean inTable
protected boolean inTitle
public static final antlr.collections.impl.BitSet _tokenSet_0
public static final antlr.collections.impl.BitSet _tokenSet_1
public static final antlr.collections.impl.BitSet _tokenSet_2
public static final antlr.collections.impl.BitSet _tokenSet_3
public static final antlr.collections.impl.BitSet _tokenSet_4
public static final antlr.collections.impl.BitSet _tokenSet_5
public static final antlr.collections.impl.BitSet _tokenSet_6
public static final antlr.collections.impl.BitSet _tokenSet_7
public static final antlr.collections.impl.BitSet _tokenSet_8
public static final antlr.collections.impl.BitSet _tokenSet_9
public static final antlr.collections.impl.BitSet _tokenSet_10
public static final antlr.collections.impl.BitSet _tokenSet_11
public static final antlr.collections.impl.BitSet _tokenSet_12
public static final antlr.collections.impl.BitSet _tokenSet_13
public static final antlr.collections.impl.BitSet _tokenSet_14
public static final antlr.collections.impl.BitSet _tokenSet_15
public static final antlr.collections.impl.BitSet _tokenSet_16
public static final antlr.collections.impl.BitSet _tokenSet_17
public static final antlr.collections.impl.BitSet _tokenSet_18
public static final antlr.collections.impl.BitSet _tokenSet_19
Constructor Detail |
---|
public YAMLexer(Reader in, YAMContext context)
public YAMLexer(InputStream in)
public YAMLexer(Reader in)
public YAMLexer(antlr.InputBuffer ib)
public YAMLexer(antlr.LexerSharedInputState state)
Method Detail |
---|
public YAMTarget getTarget()
public YAMContext getContext()
public void setContext(YAMContext context)
public abstract void translate(YAMTarget target) throws antlr.TokenStreamException
antlr.TokenStreamException
protected abstract void closeAllLists()
protected abstract void closeAllLists(int level)
protected abstract void closeList()
protected abstract void captureText()
protected abstract void ul(int level)
protected abstract void ol(int level)
protected abstract void closeSectionsToLevel(int level)
protected abstract void section(String text, int level)
protected abstract void title(String title)
protected abstract void define(String id, String value)
protected abstract void plugin(String id, Vector args)
protected abstract void variable(String id)
public antlr.Token nextToken() throws antlr.TokenStreamException
nextToken
in interface antlr.TokenStream
antlr.TokenStreamException
public final void mBOLD(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
public final void mITALIC(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
public final void mTT(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
public final void mLINK(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
public final void mANCHOR(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
public final void mTITLE(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
protected final void mNOT_SPECIAL_CHAR(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
public final void mBR(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
public final void mBLANK(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
public final void mLONGDASH(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
protected final void mTOP_PAREN(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
protected final void mNESTED_PAREN(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
public final void mPLUGIN(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
protected final void mID(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
protected final void mWS(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
protected final void mARG(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
protected final Vector mARGLIST(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
protected final void mCODE(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
protected final void mSTRING(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
protected final void mTEXT_TIL_END_ARG(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
public final void mESC(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
protected final void mESC2(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
public final void mLINE_START_THEN_MARKUP(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
protected final void mLEFT_EDGE_MARKUP(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
public final void mBLANK_LINE_THEN_MARKUP(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
protected final void mBLOCKQUOTE(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
protected final void mSECTION(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
protected final void mTABLE(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
protected final void mEND_TABLE(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
protected final void mINQUOTE(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
protected final void mLEVEL(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
public final void mCOL_SEP(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
public final void mROW_SEP(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
protected final void mTEXT(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
protected final void mWS2(boolean _createToken) throws antlr.RecognitionException, antlr.CharStreamException, antlr.TokenStreamException
antlr.RecognitionException
antlr.CharStreamException
antlr.TokenStreamException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |