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
isTrue
, this method is not called, andgrammar_collapsed_elems()
is called instead.
- grammar = (<Grammar: REPEAT((Item, REPEAT((BinaryOperator, Item), min=0)))>, <Grammar: OPTIONAL(WHITESPACE)>)¶
- grammar_desc = 'AssuraFile'¶
- grammar_name = 'AssuraFile'¶
- grammar_tags = ()¶
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
isTrue
, this method is not called, andgrammar_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¶
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
isTrue
, this method is not called, andgrammar_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
ParseError
s. 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.
- 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
isTrue
, this method is not called, andgrammar_collapsed_elems()
is called instead.
- grammar = (<Grammar: REPEAT((Item, REPEAT((BinaryOperator, Item), min=0)))>, <Grammar: OPTIONAL(WHITESPACE)>)¶
- grammar_desc = 'TechFile'¶
- grammar_name = 'TechFile'¶
- grammar_tags = ()¶