Package schrodinger :: Package application :: Package desmond :: Package antlr3 :: Module streams :: Class ANTLRInputStream
[hide private]
[frames] | no frames]

Class ANTLRInputStream

object --+            
         |            
 IntStream --+        
             |        
    CharStream --+    
                 |    
 ANTLRStringStream --+
                     |
                    ANTLRInputStream

@brief CharStream that reads data from a file-like object.

This is a char buffer stream that is loaded from a file like object all at once when you construct the object.

All input is consumed from the file, but it is not closed.

Instance Methods [hide private]
 
__init__(self, file, encoding=None)
@param file A file-like object holding your input.

Inherited from ANTLRStringStream: LA, LT, consume, getCharPositionInLine, getLine, getSourceName, index, mark, release, reset, rewind, seek, setCharPositionInLine, setLine, size, substring

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]

Inherited from CharStream: EOF

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, file, encoding=None)
(Constructor)

 

@param file A file-like object holding your input. Only the read()
   method must be implemented.

@param encoding If you set the optional encoding argument, then the
   data will be decoded on the fly.
   

Overrides: object.__init__