Groovy Documentation

java.gate.wiki.antlr
Class YAMLexer

java.lang.Object
  java.gate.wiki.antlr.YAMLexer
All Implemented Interfaces:
YAMLexerTokenTypes

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 BitSet _tokenSet_0

static BitSet _tokenSet_1

static BitSet _tokenSet_10

static BitSet _tokenSet_11

static BitSet _tokenSet_12

static BitSet _tokenSet_13

static BitSet _tokenSet_14

static BitSet _tokenSet_15

static BitSet _tokenSet_16

static BitSet _tokenSet_17

static BitSet _tokenSet_18

static BitSet _tokenSet_19

static BitSet _tokenSet_2

static BitSet _tokenSet_3

static BitSet _tokenSet_4

static BitSet _tokenSet_5

static BitSet _tokenSet_6

static BitSet _tokenSet_7

static BitSet _tokenSet_8

static 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

 
Constructor Summary
YAMLexer(Reader in, YAMContext context)

Used by sublexers that handle plugin data; shares context with original

YAMLexer(InputStream in)

YAMLexer(Reader in)

YAMLexer(InputBuffer ib)

YAMLexer(LexerSharedInputState state)

 
Method Summary
protected void captureText()

protected void closeAllLists()

protected void closeAllLists(int level)

protected void closeList()

protected void closeSectionsToLevel(int level)

protected 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(boolean _createToken)

void mBLANK_LINE_THEN_MARKUP(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(boolean _createToken)

The catch-all "else" rule.

protected void mTEXT_TIL_END_ARG(boolean _createToken)

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)

private static long[] mk_tokenSet_0()

private static long[] mk_tokenSet_1()

private static long[] mk_tokenSet_10()

private static long[] mk_tokenSet_11()

private static long[] mk_tokenSet_12()

private static long[] mk_tokenSet_13()

private static long[] mk_tokenSet_14()

private static long[] mk_tokenSet_15()

private static long[] mk_tokenSet_16()

private static long[] mk_tokenSet_17()

private static long[] mk_tokenSet_18()

private static long[] mk_tokenSet_19()

private static long[] mk_tokenSet_2()

private static long[] mk_tokenSet_3()

private static long[] mk_tokenSet_4()

private static long[] mk_tokenSet_5()

private static long[] mk_tokenSet_6()

private static long[] mk_tokenSet_7()

private static long[] mk_tokenSet_8()

private static long[] mk_tokenSet_9()

Token nextToken()

protected void ol(int level)

protected void plugin(String id, Vector args)

protected void section(String text, int level)

void setContext(YAMContext context)

protected void title(String title)

void translate(YAMTarget target)

Begin on-the-fly syntax-directed translation

protected void ul(int level)

protected void variable(String id)

 
Methods inherited from class Object
wait, wait, wait, hashCode, getClass, equals, toString, notify, notifyAll
 

Field Detail

_tokenSet_0

static final BitSet _tokenSet_0


_tokenSet_1

static final BitSet _tokenSet_1


_tokenSet_10

static final BitSet _tokenSet_10


_tokenSet_11

static final BitSet _tokenSet_11


_tokenSet_12

static final BitSet _tokenSet_12


_tokenSet_13

static final BitSet _tokenSet_13


_tokenSet_14

static final BitSet _tokenSet_14


_tokenSet_15

static final BitSet _tokenSet_15


_tokenSet_16

static final BitSet _tokenSet_16


_tokenSet_17

static final BitSet _tokenSet_17


_tokenSet_18

static final BitSet _tokenSet_18


_tokenSet_19

static final BitSet _tokenSet_19


_tokenSet_2

static final BitSet _tokenSet_2


_tokenSet_3

static final BitSet _tokenSet_3


_tokenSet_4

static final BitSet _tokenSet_4


_tokenSet_5

static final BitSet _tokenSet_5


_tokenSet_6

static final BitSet _tokenSet_6


_tokenSet_7

static final BitSet _tokenSet_7


_tokenSet_8

static final BitSet _tokenSet_8


_tokenSet_9

static final BitSet _tokenSet_9


context

protected YAMContext context
Tracks variables and such; later track line number etc...


inTable

protected boolean inTable
Can't do some things in tables like bullet lists


inTitle

protected boolean inTitle


target

YAMTarget target
Each lexer/translator can have it's own target language


 
Constructor Detail

YAMLexer

public YAMLexer(Reader in, YAMContext context)
Used by sublexers that handle plugin data; shares context with original


YAMLexer

public YAMLexer(InputStream in)


YAMLexer

public YAMLexer(Reader in)


YAMLexer

public YAMLexer(InputBuffer ib)


YAMLexer

public YAMLexer(LexerSharedInputState state)


 
Method Detail

captureText

protected void captureText()


closeAllLists

protected void closeAllLists()


closeAllLists

protected void closeAllLists(int level)


closeList

protected void closeList()


closeSectionsToLevel

protected void closeSectionsToLevel(int level)


define

protected void define(String id, String value)


getContext

public YAMContext getContext()


getTarget

public YAMTarget getTarget()


mANCHOR

public final void mANCHOR(boolean _createToken)
An anchor is a # followed by an ID


mARG

protected final void mARG(boolean _createToken)


mARGLIST

protected final Vector mARGLIST(boolean _createToken)


mBLANK

public final void mBLANK(boolean _createToken)


mBLANK_LINE_THEN_MARKUP

public final void mBLANK_LINE_THEN_MARKUP(boolean _createToken)


mBLOCKQUOTE

protected final void mBLOCKQUOTE(boolean _createToken)


mBOLD

public final void mBOLD(boolean _createToken)


mBR

public final void mBR(boolean _createToken)


mCODE

protected final void mCODE(boolean _createToken)


mCOL_SEP

public final void mCOL_SEP(boolean _createToken)


mEND_TABLE

protected final void mEND_TABLE(boolean _createToken)


mESC

public final void mESC(boolean _createToken)


mESC2

protected final void mESC2(boolean _createToken)


mID

protected final void mID(boolean _createToken)


mINQUOTE

protected final void mINQUOTE(boolean _createToken)


mITALIC

public final void mITALIC(boolean _createToken)


mLEFT_EDGE_MARKUP

protected final void mLEFT_EDGE_MARKUP(boolean _createToken)


mLEVEL

protected final void mLEVEL(boolean _createToken)


mLINE_START_THEN_MARKUP

public final void mLINE_START_THEN_MARKUP(boolean _createToken)


mLINK

public final void mLINK(boolean _createToken)
A link looks like %(url,title) or %(url), which is same as http://foo.com. An anchor ref to an image, table or section will be %table(name). A wikilink looks like %(WikiLink) i.e. CamelCase within the %() link indicators.


mLONGDASH

public final void mLONGDASH(boolean _createToken)


mNESTED_PAREN

protected final void mNESTED_PAREN(boolean _createToken)


mNOT_SPECIAL_CHAR

protected final void mNOT_SPECIAL_CHAR(boolean _createToken)


mPLUGIN

public final void mPLUGIN(boolean _createToken)


mROW_SEP

public final void mROW_SEP(boolean _createToken)


mSECTION

protected final void mSECTION(boolean _createToken)


mSTRING

protected final void mSTRING(boolean _createToken)


mTABLE

protected final void mTABLE(boolean _createToken)


mTEXT

protected final void mTEXT(boolean _createToken)
The catch-all "else" rule. Anything not matched as a tag, gets matched here. The chars are buffered up until the next tag is recognized at which point the target.text() method gets the text.


mTEXT_TIL_END_ARG

protected final void mTEXT_TIL_END_ARG(boolean _createToken)


mTITLE

public final void mTITLE(boolean _createToken)
First line of outermost file (stdin usually) is title


mTOP_PAREN

protected final void mTOP_PAREN(boolean _createToken)


mTT

public final void mTT(boolean _createToken)


mWS

protected final void mWS(boolean _createToken)


mWS2

protected final void mWS2(boolean _createToken)


mk_tokenSet_0

private static final long[] mk_tokenSet_0()


mk_tokenSet_1

private static final long[] mk_tokenSet_1()


mk_tokenSet_10

private static final long[] mk_tokenSet_10()


mk_tokenSet_11

private static final long[] mk_tokenSet_11()


mk_tokenSet_12

private static final long[] mk_tokenSet_12()


mk_tokenSet_13

private static final long[] mk_tokenSet_13()


mk_tokenSet_14

private static final long[] mk_tokenSet_14()


mk_tokenSet_15

private static final long[] mk_tokenSet_15()


mk_tokenSet_16

private static final long[] mk_tokenSet_16()


mk_tokenSet_17

private static final long[] mk_tokenSet_17()


mk_tokenSet_18

private static final long[] mk_tokenSet_18()


mk_tokenSet_19

private static final long[] mk_tokenSet_19()


mk_tokenSet_2

private static final long[] mk_tokenSet_2()


mk_tokenSet_3

private static final long[] mk_tokenSet_3()


mk_tokenSet_4

private static final long[] mk_tokenSet_4()


mk_tokenSet_5

private static final long[] mk_tokenSet_5()


mk_tokenSet_6

private static final long[] mk_tokenSet_6()


mk_tokenSet_7

private static final long[] mk_tokenSet_7()


mk_tokenSet_8

private static final long[] mk_tokenSet_8()


mk_tokenSet_9

private static final long[] mk_tokenSet_9()


nextToken

public Token nextToken()


ol

protected void ol(int level)


plugin

protected void plugin(String id, Vector args)


section

protected void section(String text, int level)


setContext

public void setContext(YAMContext context)


title

protected void title(String title)


translate

public void translate(YAMTarget target)
Begin on-the-fly syntax-directed translation


ul

protected void ul(int level)


variable

protected void variable(String id)


 

Groovy Documentation