InputStream
interface InputStream implements Iterator (View source)
Interface for stream readers.
The parser only reads from streams. Various input sources can write an adapater to this InputStream.
Currently provided InputStream implementations include FileInputStream and StringInputStream.
Methods
Returns the current line that is being consumed.
Returns the current column of the current line that the tokenizer is at.
Get all characters until EOF.
Read to a particular match (or until $max bytes are consumed).
Returns the string so long as $bytes matches.
Unconsume one character.
Retrieve the next character without advancing the pointer.
Details
        at line         line 21
                            
    
    currentLine()
    
    Returns the current line that is being consumed.
TODO: Move this to the scanner.
        at line         line 32
                            
    int
    columnOffset()
    
    Returns the current column of the current line that the tokenizer is at.
Newlines are column 0. The first char after a newline is column 1.
        at line         line 39
                            
    
    remainingChars()
    
    Get all characters until EOF.
This consumes characters until the EOF.
        at line         line 57
                            
    mixed
    charsUntil(
    string $bytes, 
    int $max = null)
    
    Read to a particular match (or until $max bytes are consumed).
This operates on byte sequences, not characters.
Matches as far as possible until we reach a certain set of bytes and returns the matched substring.
        at line         line 73
                            
    
    charsWhile(
    string $bytes, 
    int $max = null)
    
    Returns the string so long as $bytes matches.
Matches as far as possible with a certain set of bytes and returns the matched substring.
        at line         line 81
                            
    
    unconsume(
    int $howMany = 1)
    
    Unconsume one character.
        at line         line 86
                            
    
    peek()
    
    Retrieve the next character without advancing the pointer.