PSP.StreamReader
index
/usr/local/share/webware/PSP/StreamReader.py

This module co-ordinates the reading of the source file.
 
It maintains the current position of the parser in the source file.
 
(c) Copyright by Jay Love, 2000 (mailto:jsliv@jslove.org)
 
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee or royalty is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation or portions thereof, including modifications,
that you make.
 
THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO
THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS, IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL,
INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
WITH THE USE OR PERFORMANCE OF THIS SOFTWARE !
 
This software is based in part on work done by the Jakarta group.

 
Modules
       
PSP.BraceConverter
PSP.PSPUtils
copy
os
re
time
types

 
Classes
       
Mark
StreamReader

 
class Mark
    The Mark class marks a point in an input stream.
 
  Methods defined here:
__init__(self, reader, fileid=None, stream=None, inBaseDir=None, encoding=None)
__repr__(self)
__str__(self)
getFile(self)
popStream(self)
pushStream(self, infileid, inStream, inBaseDir, inEncoding)

 
class StreamReader
    This class handles the PSP source file.
 
It provides the characters to the other parts of the system.
It can move forward and backwards in a file and remember locactions.
 
  Methods defined here:
Advance(self, length)
Advance length characters
Mark(self)
Matches(self, st)
__init__(self, filename, ctxt)
getChars(self, start, stop)
getFile(self, i)
hasMoreInput(self)
init(self)
isDelimiter(self)
isSpace(self)
No advancing.
newSourceFile(self, filename)
nextChar(self)
nextContent(self)
Find next < char.
parseAttributeValue(self, valuedict)
parseTagAttributes(self)
Parse the attributes at the beginning of a tag.
parseToken(self, quoted)
peekChar(self, cnt=1)
popFile(self)
pushFile(self, file, encoding=None)
registerSourceFile(self, file)
reset(self, mark)
skipSpaces(self)
skipUntil(self, st)
Greedy search.
 
Return the point before the string, but move reader past it.

 
Data
        AwakeCreated = 0
ResponseObject = 'res'