| Home | Trees | Index | Help |
|
|---|
|
|
object --+
|
ConfigReader
| Method Summary | |
|---|---|
| __init__(self, config) | |
| __repr__(self) | |
| __str__(self) | |
| str | getChar(self)
Get the next char from the stream. |
| A token tuple. | getToken(self)
Get a token from the stream. |
| load(self,
stream,
parent,
suffix)
Load the configuration from the specified stream. | |
| str | location(self)
Return the current location (filename, line, column) in the stream as a string. |
| a token tuple - see getToken. | match(self,
t)
Ensure that the current token type matches the specified value, and advance to the next token. |
| any scalar | parseFactor(self)
Parse a factor in an multiplicative expression (a * b, a / b, a % b) |
| parseKeyValuePair(self,
parent)
Parse a key-value pair, and add it to the provided Mapping. | |
| Mapping | parseMapping(self,
parent,
suffix)
Parse a mapping. |
| parseMappingBody(self,
parent)
Parse the internals of a mapping, and add entries to the provided Mapping. | |
| Reference | parseReference(self,
type)
Parse a reference. |
| any scalar | parseScalar(self)
Parse a scalar - a terminal value such as a string or number, or an Expression or Reference. |
| Sequence | parseSequence(self,
parent,
suffix)
Parse a sequence. |
| parseSuffix(self,
ref)
Parse a reference suffix. | |
| any scalar | parseTerm(self)
Parse a term in an additive expression (a + b, a - b) |
| any | parseValue(self,
parent,
suffix)
Parse a value. |
| setStream(self,
stream)
Set the stream to the specified value, and prepare to read from it. | |
| Inherited from object | |
| __delattr__(...)
x.__delattr__('name') <==> del x.name | |
| __getattribute__(...)
x.__getattribute__('name') <==> x.name | |
| __hash__(x)
Return hash(x)... | |
| __new__(T,
S,
...)
Return a new object with type S, a subtype of T... | |
| __reduce__(...)
helper for pickle | |
| __reduce_ex__(...)
helper for pickle | |
| __setattr__(...)
x.__setattr__('name', value) <==> x.name = value | |
| Method Details |
|---|
__init__(self,
config)
|
__repr__(self)
|
__str__(self)
|
getChar(self)Get the next char from the stream. Update line and column numbers appropriately.
|
getToken(self)Get a token from the stream. String values are returned in a form where you need to eval() the returned value to get the actual string. The return value is (token_type, token_value). Multiline string tokenizing is thanks to David Janes (BlogMatrix)
|
load(self, stream, parent=None, suffix=None)Load the configuration from the specified stream.
|
location(self)Return the current location (filename, line, column) in the stream as a string. Used when printing error messages,
|
match(self, t)Ensure that the current token type matches the specified value, and advance to the next token.
|
parseFactor(self)Parse a factor in an multiplicative expression (a * b, a / b, a % b)
|
parseKeyValuePair(self, parent)Parse a key-value pair, and add it to the provided Mapping.
|
parseMapping(self, parent, suffix)Parse a mapping.
|
parseMappingBody(self, parent)Parse the internals of a mapping, and add entries to the provided Mapping.
|
parseReference(self, type)Parse a reference.
|
parseScalar(self)Parse a scalar - a terminal value such as a string or number, or an Expression or Reference.
|
parseSequence(self, parent, suffix)Parse a sequence.
|
parseSuffix(self, ref)Parse a reference suffix.
|
parseTerm(self)Parse a term in an additive expression (a + b, a - b)
|
parseValue(self, parent, suffix)Parse a value.
|
setStream(self, stream)Set the stream to the specified value, and prepare to read from it.
|
| Home | Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1 on Wed Mar 03 20:02:21 2010 | http://epydoc.sf.net |