Top Description Fields Constructors Methods
org.antlr.stringtemplate.language

public Class DefaultTemplateLexer

extends CharScanner
implements TemplateParserTokenTypes, TokenStream
Class Inheritance
All Implemented Interfaces
antlr.TokenStream, org.antlr.stringtemplate.language.TemplateParserTokenTypes
Imports
org.antlr.stringtemplate.*, java.io.*, .InputStream, .Reader, antlr.TokenStreamException, .TokenStreamIOException, .TokenStreamRecognitionException, .CharStreamException, .CharStreamIOException, .ANTLRException, .CharScanner, .InputBuffer, .ByteBuffer, .CharBuffer, .Token, .CommonToken, .RecognitionException, .NoViableAltForCharException, .MismatchedCharException, .TokenStream, .ANTLRHashString, .LexerSharedInputState, .SemanticException, java.util.Hashtable, antlr.collections.impl.BitSet

Break up an input text stream into chunks of either plain text or template actions in "$...$". Treat IF and ENDIF tokens specially.

Field Summary

Modifier and TypeField and Description
public static final BitSet
public static final BitSet
public static final BitSet
public static final BitSet
public static final BitSet
public static final BitSet
public static final BitSet
public static final BitSet
public static final BitSet
public static final BitSet
public static final BitSet
public static final BitSet
public static final BitSet
protected String
protected StringTemplate
Inherited from antlr.CharScanner:
_returnTokencaseSensitivecaseSensitiveLiteralscommitToPathEOF_CHARhashStringinputStateliteralssaveConsumedInputtabsizetexttokenObjectClasstraceDepth

Constructor Summary

AccessConstructor and Description
public
public
public
public
public

Method Summary

Modifier and TypeMethod and Description
public final void
mACTION(boolean _createToken)

protected final void
mCOMMENT(boolean _createToken)

protected final void
mESC(boolean _createToken)

protected final char
mESC_CHAR(boolean _createToken)

protected final void
mEXPR(boolean _createToken)

protected final void
mHEX(boolean _createToken)

protected final void
mIF_EXPR(boolean _createToken)

protected final void
mINDENT(boolean _createToken)

private static final long[]
private static final long[]
private static final long[]
private static final long[]
private static final long[]
private static final long[]
private static final long[]
private static final long[]
private static final long[]
private static final long[]
private static final long[]
private static final long[]
private static final long[]
protected final void
mLINE_BREAK(boolean _createToken)

public final void
mLITERAL(boolean _createToken)

protected final void
mNESTED_PARENS(boolean _createToken)

public final void
mNEWLINE(boolean _createToken)

protected final void
mSUBTEMPLATE(boolean _createToken)

protected final void
mTEMPLATE(boolean _createToken)

public Token
public void
reportError(RecognitionException e)

Overrides antlr.CharScanner.reportError.

Parser error-reporting function can be overridden in subclass
protected boolean
protected boolean
upcomingELSE(int i)

protected boolean
protected boolean
Inherited from antlr.CharScanner:
appendappendcommitconsumeconsumeUntilconsumeUntilgetCaseSensitivegetCaseSensitiveLiteralsgetColumngetCommitToPathgetFilenamegetInputBuffergetInputStategetLinegetTabSizegetTextgetTokenObjectLAmakeTokenmarkmatchmatchmatchmatchNotmatchRangenewlinepanicpanicreportErrorreportWarningresetTextrewindsetCaseSensitivesetColumnsetCommitToPathsetFilenamesetInputStatesetLinesetTabSizesetTextsetTokenObjectClasstabtestLiteralsTabletestLiteralsTabletoLowertraceIntraceIndenttraceOutuponEOF

Field Detail

_tokenSet_0back to summary
public static final BitSet _tokenSet_0
_tokenSet_1back to summary
public static final BitSet _tokenSet_1
_tokenSet_10back to summary
public static final BitSet _tokenSet_10
_tokenSet_11back to summary
public static final BitSet _tokenSet_11
_tokenSet_12back to summary
public static final BitSet _tokenSet_12
_tokenSet_2back to summary
public static final BitSet _tokenSet_2
_tokenSet_3back to summary
public static final BitSet _tokenSet_3
_tokenSet_4back to summary
public static final BitSet _tokenSet_4
_tokenSet_5back to summary
public static final BitSet _tokenSet_5
_tokenSet_6back to summary
public static final BitSet _tokenSet_6
_tokenSet_7back to summary
public static final BitSet _tokenSet_7
_tokenSet_8back to summary
public static final BitSet _tokenSet_8
_tokenSet_9back to summary
public static final BitSet _tokenSet_9
currentIndentback to summary
protected String currentIndent
selfback to summary
protected StringTemplate self

Constructor Detail

DefaultTemplateLexerback to summary
public DefaultTemplateLexer(StringTemplate self, Reader r)
DefaultTemplateLexerback to summary
public DefaultTemplateLexer(InputStream in)
DefaultTemplateLexerback to summary
public DefaultTemplateLexer(Reader in)
DefaultTemplateLexerback to summary
public DefaultTemplateLexer(InputBuffer ib)
DefaultTemplateLexerback to summary
public DefaultTemplateLexer(LexerSharedInputState state)

Method Detail

mACTIONback to summary
public final void mACTION(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
mCOMMENTback to summary
protected final void mCOMMENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
mESCback to summary
protected final void mESC(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
mESC_CHARback to summary
protected final char mESC_CHAR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
mEXPRback to summary
protected final void mEXPR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
mHEXback to summary
protected final void mHEX(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
mIF_EXPRback to summary
protected final void mIF_EXPR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
mINDENTback to summary
protected final void mINDENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
mk_tokenSet_0back to summary
private static final long[] mk_tokenSet_0()
mk_tokenSet_1back to summary
private static final long[] mk_tokenSet_1()
mk_tokenSet_10back to summary
private static final long[] mk_tokenSet_10()
mk_tokenSet_11back to summary
private static final long[] mk_tokenSet_11()
mk_tokenSet_12back to summary
private static final long[] mk_tokenSet_12()
mk_tokenSet_2back to summary
private static final long[] mk_tokenSet_2()
mk_tokenSet_3back to summary
private static final long[] mk_tokenSet_3()
mk_tokenSet_4back to summary
private static final long[] mk_tokenSet_4()
mk_tokenSet_5back to summary
private static final long[] mk_tokenSet_5()
mk_tokenSet_6back to summary
private static final long[] mk_tokenSet_6()
mk_tokenSet_7back to summary
private static final long[] mk_tokenSet_7()
mk_tokenSet_8back to summary
private static final long[] mk_tokenSet_8()
mk_tokenSet_9back to summary
private static final long[] mk_tokenSet_9()
mLINE_BREAKback to summary
protected final void mLINE_BREAK(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
mLITERALback to summary
public final void mLITERAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
mNESTED_PARENSback to summary
protected final void mNESTED_PARENS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
mNEWLINEback to summary
public final void mNEWLINE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
mSUBTEMPLATEback to summary
protected final void mSUBTEMPLATE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
mTEMPLATEback to summary
protected final void mTEMPLATE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
nextTokenback to summary
public Token nextToken() throws TokenStreamException

Implements antlr.TokenStream.nextToken.

reportErrorback to summary
public void reportError(RecognitionException e)

Overrides antlr.CharScanner.reportError.

Doc from antlr.CharScanner.reportError.

Parser error-reporting function can be overridden in subclass

upcomingAtENDback to summary
protected boolean upcomingAtEND(int i) throws CharStreamException
upcomingELSEback to summary
protected boolean upcomingELSE(int i) throws CharStreamException
upcomingENDIFback to summary
protected boolean upcomingENDIF(int i) throws CharStreamException
upcomingNewlineback to summary
protected boolean upcomingNewline(int i) throws CharStreamException