Package org.codehaus.groovy.antlr.java
Class JavaLexer
- java.lang.Object
-
- antlr.CharScanner
-
- org.codehaus.groovy.antlr.java.JavaLexer
-
- All Implemented Interfaces:
TokenStream
,JavaTokenTypes
public class JavaLexer extends CharScanner implements JavaTokenTypes, TokenStream
-
-
Field Summary
Fields Modifier and Type Field Description static BitSet
_tokenSet_0
static BitSet
_tokenSet_1
static BitSet
_tokenSet_2
static BitSet
_tokenSet_3
static BitSet
_tokenSet_4
static BitSet
_tokenSet_5
protected int
lastSigTokenType
protected JavaRecognizer
parser
protected static int
SCS_LIMIT
protected static int
SCS_LIT
protected static int
SCS_RE_TYPE
protected static int
SCS_SQ_TYPE
protected static int
SCS_TQ_TYPE
protected static int
SCS_TYPE
protected static int
SCS_VAL
protected int
stringCtorState
-
Fields inherited from class antlr.CharScanner
_returnToken, caseSensitive, caseSensitiveLiterals, commitToPath, EOF_CHAR, hashString, inputState, literals, saveConsumedInput, tabsize, text, tokenObjectClass, traceDepth
-
Fields inherited from interface org.codehaus.groovy.antlr.java.JavaTokenTypes
ABSTRACT, ANNOTATION, ANNOTATION_ARRAY_INIT, ANNOTATION_DEF, ANNOTATION_FIELD_DEF, ANNOTATION_MEMBER_VALUE_PAIR, ANNOTATIONS, ARRAY_DECLARATOR, ARRAY_INIT, ASSIGN, AT, BAND, BAND_ASSIGN, BLOCK, BNOT, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR, BXOR_ASSIGN, CASE_GROUP, CHAR_LITERAL, CLASS_DEF, COLON, COMMA, CTOR_CALL, DEC, DIGIT, DIGITS_WITH_UNDERSCORE, DIGITS_WITH_UNDERSCORE_OPT, DIV, DIV_ASSIGN, DOT, ELIST, EMPTY_STAT, ENUM_CONSTANT_DEF, ENUM_DEF, EOF, EQUAL, ESC, EXPONENT, EXPR, EXTENDS_CLAUSE, FINAL, FLOAT_SUFFIX, FOR_CONDITION, FOR_EACH_CLAUSE, FOR_INIT, FOR_ITERATOR, GE, GT, HEX_DIGIT, IDENT, IMPLEMENTS_CLAUSE, IMPORT, INC, INDEX_OP, INSTANCE_INIT, INTERFACE_DEF, LABELED_STAT, LAND, LBRACK, LCURLY, LE, LITERAL_assert, LITERAL_boolean, LITERAL_break, LITERAL_byte, LITERAL_case, LITERAL_catch, LITERAL_char, LITERAL_class, LITERAL_continue, LITERAL_default, LITERAL_do, LITERAL_double, LITERAL_else, LITERAL_enum, LITERAL_extends, LITERAL_false, LITERAL_finally, LITERAL_float, LITERAL_for, LITERAL_if, LITERAL_implements, LITERAL_import, LITERAL_instanceof, LITERAL_int, LITERAL_interface, LITERAL_long, LITERAL_native, LITERAL_new, LITERAL_null, LITERAL_package, LITERAL_private, LITERAL_protected, LITERAL_public, LITERAL_return, LITERAL_short, LITERAL_static, LITERAL_super, LITERAL_switch, LITERAL_synchronized, LITERAL_this, LITERAL_threadsafe, LITERAL_throw, LITERAL_throws, LITERAL_transient, LITERAL_true, LITERAL_try, LITERAL_void, LITERAL_volatile, LITERAL_while, LNOT, LOR, LPAREN, LT, METHOD_CALL, METHOD_DEF, MINUS, MINUS_ASSIGN, ML_COMMENT, MOD, MOD_ASSIGN, MODIFIERS, NOT_EQUAL, NULL_TREE_LOOKAHEAD, NUM_DOUBLE, NUM_FLOAT, NUM_INT, NUM_LONG, OBJBLOCK, PACKAGE_DEF, PARAMETER_DEF, PARAMETERS, PLUS, PLUS_ASSIGN, POST_DEC, POST_INC, QUESTION, RBRACK, RCURLY, RPAREN, SEMI, SL, SL_ASSIGN, SL_COMMENT, SLIST, SR, SR_ASSIGN, STAR, STAR_ASSIGN, STATIC_IMPORT, STATIC_INIT, STRICTFP, STRING_LITERAL, SUPER_CTOR_CALL, TRIPLE_DOT, TYPE, TYPE_ARGUMENT, TYPE_ARGUMENTS, TYPE_LOWER_BOUNDS, TYPE_PARAMETER, TYPE_PARAMETERS, TYPE_UPPER_BOUNDS, TYPECAST, UNARY_MINUS, UNARY_PLUS, VARIABLE_DEF, VARIABLE_PARAMETER_DEF, VOCAB, WILDCARD_TYPE, WS
-
-
Constructor Summary
Constructors Constructor Description JavaLexer(InputBuffer ib)
JavaLexer(LexerSharedInputState state)
JavaLexer(InputStream in)
JavaLexer(Reader in)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
enableAssert(boolean shouldEnable)
Enable the "assert" keywordvoid
enableEnum(boolean shouldEnable)
Enable the "enum" keywordboolean
isAssertEnabled()
Query the "assert" keyword stateboolean
isEnumEnabled()
Query the "enum" keyword statevoid
mASSIGN(boolean _createToken)
void
mAT(boolean _createToken)
void
mBAND(boolean _createToken)
void
mBAND_ASSIGN(boolean _createToken)
void
mBNOT(boolean _createToken)
void
mBOR(boolean _createToken)
void
mBOR_ASSIGN(boolean _createToken)
void
mBSR(boolean _createToken)
void
mBSR_ASSIGN(boolean _createToken)
void
mBXOR(boolean _createToken)
void
mBXOR_ASSIGN(boolean _createToken)
void
mCHAR_LITERAL(boolean _createToken)
void
mCOLON(boolean _createToken)
void
mCOMMA(boolean _createToken)
void
mDEC(boolean _createToken)
protected void
mDIGIT(boolean _createToken)
protected void
mDIGITS_WITH_UNDERSCORE(boolean _createToken)
protected void
mDIGITS_WITH_UNDERSCORE_OPT(boolean _createToken)
void
mDIV(boolean _createToken)
void
mDIV_ASSIGN(boolean _createToken)
void
mEQUAL(boolean _createToken)
protected void
mESC(boolean _createToken)
protected void
mEXPONENT(boolean _createToken)
protected void
mFLOAT_SUFFIX(boolean _createToken)
void
mGE(boolean _createToken)
void
mGT(boolean _createToken)
protected void
mHEX_DIGIT(boolean _createToken)
void
mIDENT(boolean _createToken)
void
mINC(boolean _createToken)
void
mLAND(boolean _createToken)
void
mLBRACK(boolean _createToken)
void
mLCURLY(boolean _createToken)
void
mLE(boolean _createToken)
void
mLNOT(boolean _createToken)
void
mLOR(boolean _createToken)
void
mLPAREN(boolean _createToken)
void
mLT(boolean _createToken)
void
mMINUS(boolean _createToken)
void
mMINUS_ASSIGN(boolean _createToken)
void
mML_COMMENT(boolean _createToken)
void
mMOD(boolean _createToken)
void
mMOD_ASSIGN(boolean _createToken)
void
mNOT_EQUAL(boolean _createToken)
void
mNUM_INT(boolean _createToken)
void
mPLUS(boolean _createToken)
void
mPLUS_ASSIGN(boolean _createToken)
void
mQUESTION(boolean _createToken)
void
mRBRACK(boolean _createToken)
void
mRCURLY(boolean _createToken)
void
mRPAREN(boolean _createToken)
void
mSEMI(boolean _createToken)
void
mSL(boolean _createToken)
void
mSL_ASSIGN(boolean _createToken)
void
mSL_COMMENT(boolean _createToken)
void
mSR(boolean _createToken)
void
mSR_ASSIGN(boolean _createToken)
void
mSTAR(boolean _createToken)
void
mSTAR_ASSIGN(boolean _createToken)
void
mSTRING_LITERAL(boolean _createToken)
protected void
mVOCAB(boolean _createToken)
void
mWS(boolean _createToken)
Token
nextToken()
TokenStream
plumb()
This is a bit of plumbing which resumes collection of string constructor bodies, after an embedded expression has been parsed.-
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
-
-
-
-
Field Detail
-
SCS_TYPE
protected static final int SCS_TYPE
- See Also:
- Constant Field Values
-
SCS_VAL
protected static final int SCS_VAL
- See Also:
- Constant Field Values
-
SCS_LIT
protected static final int SCS_LIT
- See Also:
- Constant Field Values
-
SCS_LIMIT
protected static final int SCS_LIMIT
- See Also:
- Constant Field Values
-
SCS_SQ_TYPE
protected static final int SCS_SQ_TYPE
- See Also:
- Constant Field Values
-
SCS_TQ_TYPE
protected static final int SCS_TQ_TYPE
- See Also:
- Constant Field Values
-
SCS_RE_TYPE
protected static final int SCS_RE_TYPE
- See Also:
- Constant Field Values
-
stringCtorState
protected int stringCtorState
-
lastSigTokenType
protected int lastSigTokenType
-
parser
protected JavaRecognizer parser
-
_tokenSet_0
public static final BitSet _tokenSet_0
-
_tokenSet_1
public static final BitSet _tokenSet_1
-
_tokenSet_2
public static final BitSet _tokenSet_2
-
_tokenSet_3
public static final BitSet _tokenSet_3
-
_tokenSet_4
public static final BitSet _tokenSet_4
-
_tokenSet_5
public static final BitSet _tokenSet_5
-
-
Constructor Detail
-
JavaLexer
public JavaLexer(InputStream in)
-
JavaLexer
public JavaLexer(Reader in)
-
JavaLexer
public JavaLexer(InputBuffer ib)
-
JavaLexer
public JavaLexer(LexerSharedInputState state)
-
-
Method Detail
-
enableAssert
public void enableAssert(boolean shouldEnable)
Enable the "assert" keyword
-
isAssertEnabled
public boolean isAssertEnabled()
Query the "assert" keyword state
-
enableEnum
public void enableEnum(boolean shouldEnable)
Enable the "enum" keyword
-
isEnumEnabled
public boolean isEnumEnabled()
Query the "enum" keyword state
-
plumb
public TokenStream plumb()
This is a bit of plumbing which resumes collection of string constructor bodies, after an embedded expression has been parsed. Usage: new JavaRecognizer(new JavaLexer(in).plumb()).
-
nextToken
public Token nextToken() throws TokenStreamException
- Specified by:
nextToken
in interfaceTokenStream
- Throws:
TokenStreamException
-
mQUESTION
public final void mQUESTION(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mLPAREN
public final void mLPAREN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mRPAREN
public final void mRPAREN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mLBRACK
public final void mLBRACK(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mRBRACK
public final void mRBRACK(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mLCURLY
public final void mLCURLY(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mRCURLY
public final void mRCURLY(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mCOLON
public final void mCOLON(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mCOMMA
public final void mCOMMA(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mASSIGN
public final void mASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mEQUAL
public final void mEQUAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mLNOT
public final void mLNOT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mBNOT
public final void mBNOT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mNOT_EQUAL
public final void mNOT_EQUAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mDIV
public final void mDIV(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mDIV_ASSIGN
public final void mDIV_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mPLUS
public final void mPLUS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mPLUS_ASSIGN
public final void mPLUS_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mINC
public final void mINC(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mMINUS
public final void mMINUS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mMINUS_ASSIGN
public final void mMINUS_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mDEC
public final void mDEC(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mSTAR
public final void mSTAR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mSTAR_ASSIGN
public final void mSTAR_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mMOD
public final void mMOD(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mMOD_ASSIGN
public final void mMOD_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mSR
public final void mSR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mSR_ASSIGN
public final void mSR_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mBSR
public final void mBSR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mBSR_ASSIGN
public final void mBSR_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mGE
public final void mGE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mGT
public final void mGT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mSL
public final void mSL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mSL_ASSIGN
public final void mSL_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mLE
public final void mLE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mLT
public final void mLT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mBXOR
public final void mBXOR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mBXOR_ASSIGN
public final void mBXOR_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mBOR
public final void mBOR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mBOR_ASSIGN
public final void mBOR_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mLOR
public final void mLOR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mBAND
public final void mBAND(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mBAND_ASSIGN
public final void mBAND_ASSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mLAND
public final void mLAND(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mSEMI
public final void mSEMI(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mWS
public final void mWS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mSL_COMMENT
public final void mSL_COMMENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mML_COMMENT
public final void mML_COMMENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mCHAR_LITERAL
public final void mCHAR_LITERAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mESC
protected final void mESC(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mSTRING_LITERAL
public final void mSTRING_LITERAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mHEX_DIGIT
protected final void mHEX_DIGIT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mVOCAB
protected final void mVOCAB(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mIDENT
public final void mIDENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mDIGIT
protected final void mDIGIT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mDIGITS_WITH_UNDERSCORE
protected final void mDIGITS_WITH_UNDERSCORE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mDIGITS_WITH_UNDERSCORE_OPT
protected final void mDIGITS_WITH_UNDERSCORE_OPT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mNUM_INT
public final void mNUM_INT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mEXPONENT
protected final void mEXPONENT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mFLOAT_SUFFIX
protected final void mFLOAT_SUFFIX(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
mAT
public final void mAT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
-
-