Top Description Fields Constructors Methods
org.antlr.runtime

public Class ANTLRFileStream

extends ANTLRStringStream
Class Inheritance
Imports
java.io.*

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

Modifier and TypeField and Description
protected String
Inherited from org.antlr.runtime.ANTLRStringStream:
charPositionInLinedatalastMarkerlinemarkDepthmarkersnnamep

Constructor Summary

AccessConstructor and Description
public
public
ANTLRFileStream(String fileName, String encoding)

Method Summary

Modifier and TypeMethod and Description
public String
public void
load(String fileName, String encoding)

Inherited from org.antlr.runtime.ANTLRStringStream:
consumegetCharPositionInLinegetLineindexLALTmarkreleaseresetrewindrewindseeksetCharPositionInLinesetLinesizesubstringtoString

Field Detail

fileNameback to summary
protected String fileName

Constructor Detail

ANTLRFileStreamback to summary
public ANTLRFileStream(String fileName) throws IOException
ANTLRFileStreamback to summary
public ANTLRFileStream(String fileName, String encoding) throws IOException

Method Detail

getSourceNameback to summary
public String getSourceName()

Overrides org.antlr.runtime.ANTLRStringStream.getSourceName.

Implements org.antlr.runtime.IntStream.getSourceName.

Doc from org.antlr.runtime.IntStream.getSourceName.

Where 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.

Annotations
@Override
loadback to summary
public void load(String fileName, String encoding) throws IOException