Class CaseChangingCharStream
java.lang.Object
com.espertech.esper.compiler.internal.parse.CaseChangingCharStream
- All Implemented Interfaces:
org.antlr.v4.runtime.CharStream
,org.antlr.v4.runtime.IntStream
CREDIT: ANTLR
See Link
This class supports case-insensitive lexing by wrapping an existing
CharStream
and forcing the lexer to see either upper or
lowercase characters. Grammar literals should then be either upper or
lower case such as 'BEGIN' or 'begin'. The text of the character
stream is unaffected. Example: input 'BeGiN' would match lexer rule
'BEGIN' if constructor parameter upper=true but getText() would return
'BeGiN'.-
Field Summary
Fields inherited from interface org.antlr.v4.runtime.IntStream
EOF, UNKNOWN_SOURCE_NAME
-
Constructor Summary
ConstructorDescriptionCaseChangingCharStream
(org.antlr.v4.runtime.CharStream stream, boolean upper) Constructs a new CaseChangingCharStream wrapping the givenCharStream
forcing all characters to upper case or lower case. -
Method Summary
-
Constructor Details
-
CaseChangingCharStream
public CaseChangingCharStream(org.antlr.v4.runtime.CharStream stream, boolean upper) Constructs a new CaseChangingCharStream wrapping the givenCharStream
forcing all characters to upper case or lower case.- Parameters:
stream
- The stream to wrap.upper
- If true force each symbol to upper case, otherwise force to lower.
-
-
Method Details
-
getText
- Specified by:
getText
in interfaceorg.antlr.v4.runtime.CharStream
-
consume
public void consume()- Specified by:
consume
in interfaceorg.antlr.v4.runtime.IntStream
-
LA
public int LA(int i) - Specified by:
LA
in interfaceorg.antlr.v4.runtime.IntStream
-
mark
public int mark()- Specified by:
mark
in interfaceorg.antlr.v4.runtime.IntStream
-
release
public void release(int marker) - Specified by:
release
in interfaceorg.antlr.v4.runtime.IntStream
-
index
public int index()- Specified by:
index
in interfaceorg.antlr.v4.runtime.IntStream
-
seek
public void seek(int index) - Specified by:
seek
in interfaceorg.antlr.v4.runtime.IntStream
-
size
public int size()- Specified by:
size
in interfaceorg.antlr.v4.runtime.IntStream
-
getSourceName
- Specified by:
getSourceName
in interfaceorg.antlr.v4.runtime.IntStream
-