pdkmaster.io.parsing

pdkmaster.io.parsing.assura

class pdkmaster.io.parsing.assura.AssuraFile(*args)[source]

Bases: SkillFile

grammar_elem_init(sessiondata)[source]

This method is called on each result object after it is fully initialized, before the resulting parse tree is returned to the caller. It can be overridden to perform any custom initialization desired (the default implementation does nothing).

Note: If grammar_collapse is True, this method is not called, and grammar_collapsed_elems() is called instead.

classmethod parse_string(text)[source]
grammar = (<Grammar: REPEAT((Item, REPEAT((BinaryOperator, Item), min=0)))>, <Grammar: OPTIONAL(WHITESPACE)>)
grammar_desc = 'AssuraFile'
grammar_name = 'AssuraFile'
grammar_tags = ()
class pdkmaster.io.parsing.assura.AssuraInterpreter[source]

Bases: SkillInterpreter

interpret_setq(context, args)[source]
interpret_drcExtractRules(context, args)[source]
interpret_drc(context, args)[source]
interpret_errorLayer(context, args)[source]
interpret_operation(context, args, *, operation)[source]
interpret_if(context, args)[source]
interpret_switch(context, args)[source]
interpret_extractDevice(context, args)[source]
interpret_extractRES(context, args)
interpret_extractCAP(context, args)
interpret_extractDIODE(context, args)
interpret_extractMOS(context, args)
interpret_extractBJT(context, args)

pdkmaster.io.parsing.display

class pdkmaster.io.parsing.display.DisplayFile(*args)[source]

Bases: SkillFile

grammar_elem_init(sessiondata)[source]

This method is called on each result object after it is fully initialized, before the resulting parse tree is returned to the caller. It can be overridden to perform any custom initialization desired (the default implementation does nothing).

Note: If grammar_collapse is True, this method is not called, and grammar_collapsed_elems() is called instead.

grammar = (<Grammar: REPEAT((Item, REPEAT((BinaryOperator, Item), min=0)))>, <Grammar: OPTIONAL(WHITESPACE)>)
grammar_desc = 'DisplayFile'
grammar_name = 'DisplayFile'
grammar_tags = ()

pdkmaster.io.parsing.layermap

class pdkmaster.io.parsing.layermap.LayerMap(spec)[source]

Bases: object

static parse_string(text)[source]

pdkmaster.io.parsing.skill_grammar

A modgrammar for Cadence SKILL files

Top Grammar is SkillFile. This grammar wants to parse all valid SKILL scripts, including Cadence text technology files, Assura rules etc. This parser may parse invalid SKILL scripts.

class pdkmaster.io.parsing.skill_grammar.SkillFile(*args)[source]

Bases: <class ‘pdkmaster.io.parsing.skill_grammar._BaseGrammar’>

grammar_whitespace_mode = 'optional'
grammar = (<Grammar: REPEAT((Item, REPEAT((BinaryOperator, Item), min=0)))>, <Grammar: OPTIONAL(WHITESPACE)>)
grammar_elem_init(sessiondata)[source]

This method is called on each result object after it is fully initialized, before the resulting parse tree is returned to the caller. It can be overridden to perform any custom initialization desired (the default implementation does nothing).

Note: If grammar_collapse is True, this method is not called, and grammar_collapsed_elems() is called instead.

classmethod parser(sessiondata=None, *args, **kwargs)[source]

Return a GrammarParser associated with this grammar.

If provided, sessiondata can contain data which should be provided to the grammar_elem_init() method of each result object created during parsing.

The tabs parameter indicates the width of “tab stops” in the input (i.e. how far a “tab” character will advance the column position when encountered). This is only used to correctly report column numbers in ParseErrors. If you don’t care about that, or your input does not contain tabs, you can ignore this parameter.

The debug and debug_flags options control whether and how debugging information will be output while using this parser. For more information on grammar debugging, see the modgrammar.debugging module documentation.

classmethod parse_string(text, *, value4funcs={}, dont_convert=[])[source]
grammar_desc = 'SkillFile'
grammar_max = 2
grammar_min = 2
grammar_name = 'SkillFile'
grammar_tags = ()
grammar_whitespace = re.compile('(\\s+|;.*?\\n|/\\*(.|\\n)*?\\*/)+')

pdkmaster.io.parsing.tf

class pdkmaster.io.parsing.tf.TechFile(*args)[source]

Bases: SkillFile

grammar_elem_init(sessiondata)[source]

This method is called on each result object after it is fully initialized, before the resulting parse tree is returned to the caller. It can be overridden to perform any custom initialization desired (the default implementation does nothing).

Note: If grammar_collapse is True, this method is not called, and grammar_collapsed_elems() is called instead.

classmethod parse_string(text)[source]
grammar = (<Grammar: REPEAT((Item, REPEAT((BinaryOperator, Item), min=0)))>, <Grammar: OPTIONAL(WHITESPACE)>)
grammar_desc = 'TechFile'
grammar_name = 'TechFile'
grammar_tags = ()