Arena  1.0
A content management system
 All Classes Files Functions Variables Pages
Library.Parse.Scan.Scanners.AScanner Class Reference

A scanner that tokenizes a source stream. More...

+ Inheritance diagram for Library.Parse.Scan.Scanners.AScanner:

Public Member Functions

def __init__
 Construct a scanner that will tokenize the specified stream. More...
 
def init
 Initializer.
 
def PeekToken
 Peek at the next token from the source stream.
 
def NextToken
 Retrieve the next token from the source stream. More...
 
def moveTo
 Move to a new position within the source stream. More...
 
def toString
 Return a string representation of the scanner. More...
 
def Source
 Retrieve the source stream used by the scanner. More...
 
def line
 Retrieve the current line number within the source or set the line number within the source. More...
 
def position
 Retrieve the scanner's current position within the source stream. More...
 
def __iter__
 Return an iterator that retrieves tokens from the scanner. More...
 
- Public Member Functions inherited from Library.Base.Classwork.AnObject
def init
 Initialize a new object instance. More...
 
def __init__
 Construct and initialize a new instance of AnObject. More...
 
def __del__
 Destroy the object instance. More...
 
def displayName
 Construct a "pretty" display name for the class instance, based on the name of its class. More...
 
def implements
 Determine whether the class instance is related to the specified class. More...
 
def toString
 Return a string representation of the class, suitable for output to a console or text-based device. More...
 
def __str__
 Return a string representation of the class. More...
 
def classname
 Return the name of the class from which the instance was created. More...
 
def name
 Return the name of the class. More...
 
- Public Member Functions inherited from Library.String.Utilities.IsPrintable
def toString
 Return a string representation of the class conveniently. More...
 
def __str__
 Return a string representation of the class. More...
 
def printTo
 Print a string representation of the class to the specified stream. More...
 

Detailed Description

A scanner that tokenizes a source stream.

Constructor & Destructor Documentation

def Library.Parse.Scan.Scanners.AScanner.__init__ (   Self,
  ThisStream 
)

Construct a scanner that will tokenize the specified stream.

Member Function Documentation

def Library.Parse.Scan.Scanners.AScanner.__iter__ (   Self)

Return an iterator that retrieves tokens from the scanner.

This method is provided for convenience, so that the scanner can be used as part of a for...in loop.

def Library.Parse.Scan.Scanners.AScanner.line (   Self,
  newLineNumber = 0 
)

Retrieve the current line number within the source or set the line number within the source.

Not all implementations of AScanner will allow the line number to be set by using this method. The base implementation of the method ignores the new line number specified and always returns the current line number.

def Library.Parse.Scan.Scanners.AScanner.moveTo (   Self,
  newPosition 
)

Move to a new position within the source stream.

def Library.Parse.Scan.Scanners.AScanner.NextToken (   Self)

Retrieve the next token from the source stream.

def Library.Parse.Scan.Scanners.AScanner.position (   Self)

Retrieve the scanner's current position within the source stream.

def Library.Parse.Scan.Scanners.AScanner.Source (   Self)

Retrieve the source stream used by the scanner.

def Library.Parse.Scan.Scanners.AScanner.toString (   Self)

Return a string representation of the scanner.

This representation is the name of the stream, if available; otherwise, it is the display name of the class.


The documentation for this class was generated from the following file: