Horizon
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
pybis.Parse Class Reference
Inheritance diagram for pybis.Parse:
pybis.Bracket pybis.Header pybis.IBISCommon pybis.Param pybis.Comment pybis.End pybis.Keyword pybis.Section pybis.Text pybis.EBD pybis.IBS pybis.PKG pybis.DictParam pybis.RangeDictParam pybis.RangeParam

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
 

Detailed Description

Base pybis Parse object.

Constructor & Destructor Documentation

◆ __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

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.

Member Function Documentation

◆ can_parse()

pybis.Parse.can_parse (   self,
  text 
)
True if we can parse 'text'.

Reimplemented in pybis.Bracket, and pybis.Param.

◆ fin()

pybis.Parse.fin (   self,
  node 
)

◆ find_parser()

pybis.Parse.find_parser (   self,
  text 
)
Find a child parser that can parse 'text'.

◆ flatten()

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.

◆ 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 
)
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.

◆ merge()

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.

◆ parse()

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.

◆ 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: