Class CaseChangingCharStream
java.lang.Object
org.elasticsearch.xpack.esql.parser.CaseChangingCharStream
- All Implemented Interfaces:
org.antlr.v4.runtime.CharStream,org.antlr.v4.runtime.IntStream
This class supports case-insensitive lexing by wrapping an existing
CharStream and forcing the lexer to see lowercase characters
Grammar literals should then be lower case such as begin.
The text of the character stream is unaffected.
Example: input BeGiN would match lexer rule begin
but CharStream.getText(org.antlr.v4.runtime.misc.Interval) will return BeGiN.
-
Field Summary
Fields inherited from interface org.antlr.v4.runtime.IntStream
EOF, UNKNOWN_SOURCE_NAME -
Constructor Summary
ConstructorsConstructorDescriptionCaseChangingCharStream(org.antlr.v4.runtime.CharStream stream) Constructs a new CaseChangingCharStream wrapping the givenCharStreamforcing all characters to upper case or lower case. -
Method Summary
-
Constructor Details
-
CaseChangingCharStream
public CaseChangingCharStream(org.antlr.v4.runtime.CharStream stream) Constructs a new CaseChangingCharStream wrapping the givenCharStreamforcing all characters to upper case or lower case.- Parameters:
stream- The stream to wrap.
-
-
Method Details
-
getText
- Specified by:
getTextin interfaceorg.antlr.v4.runtime.CharStream
-
consume
public void consume()- Specified by:
consumein interfaceorg.antlr.v4.runtime.IntStream
-
LA
public int LA(int i) - Specified by:
LAin interfaceorg.antlr.v4.runtime.IntStream
-
mark
public int mark()- Specified by:
markin interfaceorg.antlr.v4.runtime.IntStream
-
release
public void release(int marker) - Specified by:
releasein interfaceorg.antlr.v4.runtime.IntStream
-
index
public int index()- Specified by:
indexin interfaceorg.antlr.v4.runtime.IntStream
-
seek
public void seek(int index) - Specified by:
seekin interfaceorg.antlr.v4.runtime.IntStream
-
size
public int size()- Specified by:
sizein interfaceorg.antlr.v4.runtime.IntStream
-
getSourceName
- Specified by:
getSourceNamein interfaceorg.antlr.v4.runtime.IntStream
-