|
Horizon
|
Public Member Functions | |
| def | __init__ (self, key, pyparser=None, default=None, initvalue=None, data_name=None, list_merge=False, asList=False, asDict=False, required=False) |
| def | add (self, obj) |
| def | __iadd__ (self, obj) |
| def | get_globals (self) |
| def | find_parser (self, text) |
| def | can_parse (self, text) |
| def | initial (self, text, comment) |
| def | parse (self, node, text, comment) |
| def | pyparse (self, text) |
| def | fin (self, node) |
| def | pop (self, new, name) |
| def | flatten (self, new) |
| def | 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.
| def 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.
| def pybis.Parse.can_parse | ( | self, | |
| text | |||
| ) |
True if we can parse 'text'.
Reimplemented in pybis.Bracket, and pybis.Param.
| def 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.
| def pybis.Parse.find_parser | ( | self, | |
| text | |||
| ) |
Find a child parser that can parse 'text'.
| def 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.
| def pybis.Parse.get_globals | ( | self | ) |
Get the global parse object, for things that are parseable in all contexts.
| def 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.
| def 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.
| def 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.
| def pybis.Parse.pop | ( | self, | |
| new, | |||
| name | |||
| ) |
Remove 'name' from ParseResults 'new'.
| def pybis.Parse.pyparse | ( | self, | |
| text | |||
| ) |
Use self.pyparser to parse 'text', returns parse tokens. Returns 'text' if there is no pyparser object.