Class ANTLRFileStream
java.lang.Object
org.antlr.runtime.ANTLRStringStream
org.antlr.runtime.ANTLRFileStream
- All Implemented Interfaces:
CharStream, IntStream
This is a char buffer stream that is loaded from a file
all at once when you construct the object. This looks very
much like an ANTLReader or ANTLRInputStream, but it's a special case
since we know the exact size of the object to load. We can avoid lots
of data copying.
-
Field Summary
FieldsFields inherited from class ANTLRStringStream
charPositionInLine, data, lastMarker, line, markDepth, markers, n, name, pFields inherited from interface CharStream
EOF -
Constructor Summary
ConstructorsConstructorDescriptionANTLRFileStream(String fileName) ANTLRFileStream(String fileName, String encoding) -
Method Summary
Modifier and TypeMethodDescriptionWhere are you getting symbols from? Normally, implementations will pass the buck all the way to the lexer who can ask its input stream for the file name or whatever.void
-
Field Details
-
fileName
-
-
Constructor Details
-
ANTLRFileStream
- Throws:
IOException
-
ANTLRFileStream
- Throws:
IOException
-
-
Method Details
-
load
- Throws:
IOException
-
getSourceName
Description copied from interface:IntStreamWhere are you getting symbols from? Normally, implementations will pass the buck all the way to the lexer who can ask its input stream for the file name or whatever.- Specified by:
getSourceNamein interfaceIntStream- Overrides:
getSourceNamein classANTLRStringStream
-