|
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) |
|
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) |
|
|
| key |
|
| flat_key |
|
| data_name |
|
| default |
|
| initvalue |
|
| pyparser |
|
| list_merge |
|
| asList |
|
| asDict |
|
| children |
|
| parent |
|
| globals |
|
| required |
|
◆ __init__() [1/2]
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
◆ __init__() [2/2]
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
◆ can_parse() [1/2]
def pybis.Parse.can_parse |
( |
|
self, |
|
|
|
text |
|
) |
| |
◆ can_parse() [2/2]
def pybis.Parse.can_parse |
( |
|
self, |
|
|
|
text |
|
) |
| |
◆ fin() [1/2]
def pybis.Parse.fin |
( |
|
self, |
|
|
|
node |
|
) |
| |
Add a node to the parent.
Reimplemented in pybis.IBS, pybis.Pin_EMI, pybis.EMI_Component, pybis.Board_Description, pybis.Path_Description, pybis.Package_Model, pybis.Pin_Numbers, pybis.Circuit_Call, pybis.External_Model, pybis.External_Common, pybis.Submodel, pybis.Test_Load, pybis.Test_Data, pybis.Model, pybis.BaseModel, pybis.Component, pybis.MatrixSection, pybis.RangeSection, pybis.TokenizeSection, pybis.Comment, pybis.IBS, pybis.Pin_EMI, pybis.EMI_Component, pybis.Board_Description, pybis.Path_Description, pybis.Package_Model, pybis.Pin_Numbers, pybis.Circuit_Call, pybis.External_Model, pybis.External_Common, pybis.Submodel, pybis.Test_Load, pybis.Test_Data, pybis.Model, pybis.BaseModel, pybis.Component, pybis.MatrixSection, pybis.RangeSection, pybis.TokenizeSection, and pybis.Comment.
◆ fin() [2/2]
def pybis.Parse.fin |
( |
|
self, |
|
|
|
node |
|
) |
| |
Add a node to the parent.
Reimplemented in pybis.IBS, pybis.Pin_EMI, pybis.EMI_Component, pybis.Board_Description, pybis.Path_Description, pybis.Package_Model, pybis.Pin_Numbers, pybis.Circuit_Call, pybis.External_Model, pybis.External_Common, pybis.Submodel, pybis.Test_Load, pybis.Test_Data, pybis.Model, pybis.BaseModel, pybis.Component, pybis.MatrixSection, pybis.RangeSection, pybis.TokenizeSection, pybis.Comment, pybis.IBS, pybis.Pin_EMI, pybis.EMI_Component, pybis.Board_Description, pybis.Path_Description, pybis.Package_Model, pybis.Pin_Numbers, pybis.Circuit_Call, pybis.External_Model, pybis.External_Common, pybis.Submodel, pybis.Test_Load, pybis.Test_Data, pybis.Model, pybis.BaseModel, pybis.Component, pybis.MatrixSection, pybis.RangeSection, pybis.TokenizeSection, and pybis.Comment.
◆ find_parser() [1/2]
def pybis.Parse.find_parser |
( |
|
self, |
|
|
|
text |
|
) |
| |
Find a child parser that can parse 'text'.
◆ find_parser() [2/2]
def pybis.Parse.find_parser |
( |
|
self, |
|
|
|
text |
|
) |
| |
Find a child parser that can parse 'text'.
◆ flatten() [1/2]
def pybis.Parse.flatten |
( |
|
self, |
|
|
|
new |
|
) |
| |
Reformat pyparse results as what we'd expect.
Reimplemented in pybis.Series_MOSFET, pybis.RangeSection, pybis.Text, pybis.Series_MOSFET, pybis.RangeSection, pybis.Text, pybis.RangeDictParam, pybis.RangeParam, pybis.DictParam, pybis.RangeDictParam, pybis.RangeParam, and pybis.DictParam.
◆ flatten() [2/2]
def pybis.Parse.flatten |
( |
|
self, |
|
|
|
new |
|
) |
| |
Reformat pyparse results as what we'd expect.
Reimplemented in pybis.Series_MOSFET, pybis.RangeSection, pybis.Text, pybis.Series_MOSFET, pybis.RangeSection, pybis.Text, pybis.RangeDictParam, pybis.RangeParam, pybis.DictParam, pybis.RangeDictParam, pybis.RangeParam, and pybis.DictParam.
◆ get_globals() [1/2]
def pybis.Parse.get_globals |
( |
|
self | ) |
|
Get the global parse object, for things that are parseable in all contexts.
◆ get_globals() [2/2]
def pybis.Parse.get_globals |
( |
|
self | ) |
|
Get the global parse object, for things that are parseable in all contexts.
◆ initial() [1/2]
def pybis.Parse.initial |
( |
|
self, |
|
|
|
text, |
|
|
|
comment |
|
) |
| |
Parse the first line of text and return a Node object.
Reimplemented in pybis.Param, pybis.RangeSection, pybis.TableSection, pybis.TokenizeSection, pybis.Section, pybis.Text, pybis.Keyword, pybis.End, pybis.Comment, pybis.Bracket, pybis.Param, pybis.RangeSection, pybis.TableSection, pybis.TokenizeSection, pybis.Section, pybis.Text, pybis.Keyword, pybis.End, pybis.Comment, and pybis.Bracket.
◆ initial() [2/2]
def pybis.Parse.initial |
( |
|
self, |
|
|
|
text, |
|
|
|
comment |
|
) |
| |
Parse the first line of text and return a Node object.
Reimplemented in pybis.Param, pybis.RangeSection, pybis.TableSection, pybis.TokenizeSection, pybis.Section, pybis.Text, pybis.Keyword, pybis.End, pybis.Comment, pybis.Bracket, pybis.Param, pybis.RangeSection, pybis.TableSection, pybis.TokenizeSection, pybis.Section, pybis.Text, pybis.Keyword, pybis.End, pybis.Comment, and pybis.Bracket.
◆ merge() [1/2]
def pybis.Parse.merge |
( |
|
self, |
|
|
|
orig, |
|
|
|
new |
|
) |
| |
◆ merge() [2/2]
def pybis.Parse.merge |
( |
|
self, |
|
|
|
orig, |
|
|
|
new |
|
) |
| |
◆ parse() [1/2]
def pybis.Parse.parse |
( |
|
self, |
|
|
|
node, |
|
|
|
text, |
|
|
|
comment |
|
) |
| |
Parse a subsequent line of text, False means we can't.
Reimplemented in pybis.RangeSection, pybis.DictSection, pybis.ListSection, pybis.TableSection, pybis.TokenizeSection, pybis.Text, pybis.RangeSection, pybis.DictSection, pybis.ListSection, pybis.TableSection, pybis.TokenizeSection, and pybis.Text.
◆ parse() [2/2]
def pybis.Parse.parse |
( |
|
self, |
|
|
|
node, |
|
|
|
text, |
|
|
|
comment |
|
) |
| |
Parse a subsequent line of text, False means we can't.
Reimplemented in pybis.RangeSection, pybis.DictSection, pybis.ListSection, pybis.TableSection, pybis.TokenizeSection, pybis.Text, pybis.RangeSection, pybis.DictSection, pybis.ListSection, pybis.TableSection, pybis.TokenizeSection, and pybis.Text.
◆ pop() [1/2]
def pybis.Parse.pop |
( |
|
self, |
|
|
|
new, |
|
|
|
name |
|
) |
| |
Remove 'name' from ParseResults 'new'.
◆ pop() [2/2]
def pybis.Parse.pop |
( |
|
self, |
|
|
|
new, |
|
|
|
name |
|
) |
| |
Remove 'name' from ParseResults 'new'.
◆ pyparse() [1/2]
def pybis.Parse.pyparse |
( |
|
self, |
|
|
|
text |
|
) |
| |
Use self.pyparser to parse 'text', returns parse tokens.
Returns 'text' if there is no pyparser object.
◆ pyparse() [2/2]
def 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:
- horizon-eda-1.3.0/scripts/pybis.py