Horizon
|
Public Member Functions | |
__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) | |
Public Attributes | |
key | |
flat_key | |
data_name | |
default | |
initvalue | |
pyparser | |
list_merge | |
asList | |
asDict | |
children | |
parent | |
globals | |
required | |
Base pybis Parse object.
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
Reimplemented in pybis.Series_Pin_Mapping, pybis.Series_MOSFET, pybis.Header, pybis.Component, pybis.Model, pybis.Test_Data, pybis.Test_Load, pybis.Submodel, pybis.External_Circuit, pybis.External_Model, pybis.Node_Declarations, pybis.Circuit_Call, pybis.Algorithmic_Model, pybis.Pin_Numbers, pybis.Package_Model, pybis.Path_Description, pybis.Board_Description, pybis.EMI_Component, pybis.Pin_EMI, pybis.Pin_Domain_EMI, pybis.EMI_Model, pybis.IBS, pybis.PKG, pybis.EBD, pybis.Comment, pybis.IBISCommon, pybis.BaseModel, pybis.External_Common, pybis.Text, pybis.RangeSection, pybis.DictParam, pybis.RangeParam, pybis.RangeDictParam, pybis.TokenizeSection, pybis.ListSection, pybis.DictSection, pybis.Param, pybis.TableSection, pybis.Section, and pybis.MatrixSection.
pybis.Parse.can_parse | ( | self, | |
text | |||
) |
True if we can parse 'text'.
Reimplemented in pybis.Bracket, and pybis.Param.
pybis.Parse.fin | ( | self, | |
node | |||
) |
Add a node to the parent.
Reimplemented in pybis.Comment, pybis.TokenizeSection, pybis.RangeSection, pybis.MatrixSection, pybis.Component, pybis.BaseModel, pybis.Model, pybis.Test_Data, pybis.Test_Load, pybis.Submodel, pybis.External_Common, pybis.External_Model, pybis.Circuit_Call, pybis.Pin_Numbers, pybis.Package_Model, pybis.Path_Description, pybis.Board_Description, pybis.EMI_Component, pybis.Pin_EMI, and pybis.IBS.
pybis.Parse.find_parser | ( | self, | |
text | |||
) |
Find a child parser that can parse 'text'.
pybis.Parse.flatten | ( | self, | |
new | |||
) |
Reformat pyparse results as what we'd expect.
Reimplemented in pybis.DictParam, pybis.RangeParam, pybis.RangeDictParam, pybis.Text, pybis.RangeSection, and pybis.Series_MOSFET.
pybis.Parse.get_globals | ( | self | ) |
Get the global parse object, for things that are parseable in all contexts.
pybis.Parse.initial | ( | self, | |
text, | |||
comment | |||
) |
Parse the first line of text and return a Node object.
Reimplemented in pybis.Bracket, pybis.Comment, pybis.End, pybis.Keyword, pybis.Text, pybis.Section, pybis.TokenizeSection, pybis.TableSection, pybis.RangeSection, and pybis.Param.
pybis.Parse.merge | ( | self, | |
orig, | |||
new | |||
) |
Merge two instances of the same parser under one parent.
Reimplemented in pybis.Text, pybis.DictParam, pybis.RangeParam, and pybis.RangeDictParam.
pybis.Parse.parse | ( | self, | |
node, | |||
text, | |||
comment | |||
) |
Parse a subsequent line of text, False means we can't.
Reimplemented in pybis.Text, pybis.TokenizeSection, pybis.TableSection, pybis.ListSection, pybis.DictSection, and pybis.RangeSection.
pybis.Parse.pop | ( | self, | |
new, | |||
name | |||
) |
Remove 'name' from ParseResults 'new'.
pybis.Parse.pyparse | ( | self, | |
text | |||
) |
Use self.pyparser to parse 'text', returns parse tokens. Returns 'text' if there is no pyparser object.