forked from jasder/antlr
Change AntlrInputStream to use TextReader instead of StreamReader.
This commit is contained in:
parent
9918154f34
commit
3db39af8b2
|
@ -37,7 +37,7 @@ namespace Antlr4.Runtime
|
|||
{
|
||||
/// <summary>
|
||||
/// Vacuum all input from a
|
||||
/// <see cref="System.IO.StreamReader">System.IO.StreamReader</see>
|
||||
/// <see cref="System.IO.TextReader">System.IO.TextReader</see>
|
||||
/// /
|
||||
/// <see cref="System.IO.Stream">System.IO.Stream</see>
|
||||
/// and then treat it
|
||||
|
@ -88,19 +88,19 @@ namespace Antlr4.Runtime
|
|||
}
|
||||
|
||||
/// <exception cref="System.IO.IOException"></exception>
|
||||
public AntlrInputStream(StreamReader r) : this(r, InitialBufferSize, ReadBufferSize
|
||||
public AntlrInputStream(TextReader r) : this(r, InitialBufferSize, ReadBufferSize
|
||||
)
|
||||
{
|
||||
}
|
||||
|
||||
/// <exception cref="System.IO.IOException"></exception>
|
||||
public AntlrInputStream(StreamReader r, int initialSize) : this(r, initialSize, ReadBufferSize
|
||||
public AntlrInputStream(TextReader r, int initialSize) : this(r, initialSize, ReadBufferSize
|
||||
)
|
||||
{
|
||||
}
|
||||
|
||||
/// <exception cref="System.IO.IOException"></exception>
|
||||
public AntlrInputStream(StreamReader r, int initialSize, int readChunkSize)
|
||||
public AntlrInputStream(TextReader r, int initialSize, int readChunkSize)
|
||||
{
|
||||
Load(r, initialSize, readChunkSize);
|
||||
}
|
||||
|
@ -124,7 +124,7 @@ namespace Antlr4.Runtime
|
|||
}
|
||||
|
||||
/// <exception cref="System.IO.IOException"></exception>
|
||||
public virtual void Load(StreamReader r, int size, int readChunkSize)
|
||||
public virtual void Load(TextReader r, int size, int readChunkSize)
|
||||
{
|
||||
if (r == null)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue