|
| | __init__ (self, key, pyparser=None, default=None, initvalue=None, data_name=None, list_merge=False, asList=False, asDict=False, required=False) |
|
| add (self, obj) |
|
| __iadd__ (self, obj) |
| | get_globals (self) |
| | find_parser (self, text) |
| | can_parse (self, text) |
| | initial (self, text, comment) |
| | parse (self, node, text, comment) |
| | pyparse (self, text) |
| | fin (self, node) |
| | pop (self, new, name) |
| | flatten (self, new) |
| | merge (self, orig, new) |
|
|
| key = key |
|
| flat_key = key.replace(' ', '_').lower() |
|
| data_name = data_name |
|
| default = default |
|
| initvalue = initvalue |
|
| pyparser = pyparser |
|
| list_merge = list_merge |
|
| asList = asList |
|
| asDict = asDict |
|
| children = OrderedDict() |
|
| parent = None |
|
| globals = None |
|
| required = required |
◆ __init__()
| pybis.Parse.__init__ |
( |
| self, |
|
|
| key, |
|
|
| pyparser = None, |
|
|
| default = None, |
|
|
| initvalue = None, |
|
|
| data_name = None, |
|
|
| list_merge = False, |
|
|
| asList = False, |
|
|
| asDict = False, |
|
|
| required = False ) |
key: Name of element.
pyparser: Parser to call with pyparse
default: Default value of object if not found
initvalue: Default value of object on first merge
data_name: Make the data of this node a child with name 'data_name'
list_merge: Merge multiple copies together as list
asList: Interpret pyparse results as a list
asDict: Interpret pyparse results as a dict
required: raise Exception if not found
◆ can_parse()
| pybis.Parse.can_parse |
( |
| self, |
|
|
| text ) |
◆ fin()
| pybis.Parse.fin |
( |
| self, |
|
|
| node ) |
Add a node to the parent.
Reimplemented in pybis.BaseModel, pybis.Board_Description, pybis.Circuit_Call, pybis.Comment, pybis.Component, pybis.EMI_Component, pybis.External_Common, pybis.External_Model, pybis.IBS, pybis.MatrixSection, pybis.Model, pybis.Package_Model, pybis.Path_Description, pybis.Pin_EMI, pybis.Pin_Numbers, pybis.RangeSection, pybis.Submodel, pybis.Test_Data, pybis.Test_Load, and pybis.TokenizeSection.
◆ find_parser()
| pybis.Parse.find_parser |
( |
| self, |
|
|
| text ) |
Find a child parser that can parse 'text'.
◆ flatten()
| pybis.Parse.flatten |
( |
| self, |
|
|
| new ) |
◆ get_globals()
| pybis.Parse.get_globals |
( |
| self | ) |
|
Get the global parse object, for things that are parseable in all contexts.
◆ initial()
| pybis.Parse.initial |
( |
| self, |
|
|
| text, |
|
|
| comment ) |
◆ merge()
| pybis.Parse.merge |
( |
| self, |
|
|
| orig, |
|
|
| new ) |
◆ parse()
| pybis.Parse.parse |
( |
| self, |
|
|
| node, |
|
|
| text, |
|
|
| comment ) |
◆ pop()
| pybis.Parse.pop |
( |
| self, |
|
|
| new, |
|
|
| name ) |
Remove 'name' from ParseResults 'new'.
◆ pyparse()
| pybis.Parse.pyparse |
( |
| self, |
|
|
| text ) |
Use self.pyparser to parse 'text', returns parse tokens.
Returns 'text' if there is no pyparser object.
The documentation for this class was generated from the following file: