systemc-clang 2.0.0
Parsing SystemC constructs
Loading...
Searching...
No Matches
Functions | Variables
parselib.utils Namespace Reference

Functions

 tidify (verilog, current_indent=0, indent_width=2)
 
 p (decorated)
 
 dprint (*arg, **kwargs)
 
 is_tree_type (t, name)
 
 is_tree_types (t, names)
 
 get_ids_in_tree (tree)
 
 get_ids_in_tree_dfs (tree)
 
 set_ids_in_tree_dfs (tree, ids)
 
 alternate_ids (tree, ops)
 

Variables

bool debug = True
 

Detailed Description

Utility library

Function Documentation

◆ alternate_ids()

parselib.utils.alternate_ids ( tree,
ops )
Change the ids within a tree, given operations ops as an array of lambdas

Definition at line 119 of file utils.py.

◆ dprint()

parselib.utils.dprint ( * arg,
** kwargs )
debug utility for printing, prints line number

Definition at line 43 of file utils.py.

◆ get_ids_in_tree()

parselib.utils.get_ids_in_tree ( tree)
get all ids

Definition at line 62 of file utils.py.

◆ get_ids_in_tree_dfs()

parselib.utils.get_ids_in_tree_dfs ( tree)
get all ids

Definition at line 75 of file utils.py.

◆ is_tree_type()

parselib.utils.is_tree_type ( t,
name )
Check whether t is lark Tree and whether the tree type is name

Definition at line 50 of file utils.py.

◆ is_tree_types()

parselib.utils.is_tree_types ( t,
names )
Check whether t is lark Tree and whether the tree type is name

Definition at line 55 of file utils.py.

◆ p()

parselib.utils.p ( decorated)
a decorator that helps printing out the transformation results

Definition at line 30 of file utils.py.

◆ set_ids_in_tree_dfs()

parselib.utils.set_ids_in_tree_dfs ( tree,
ids )

Definition at line 103 of file utils.py.

◆ tidify()

parselib.utils.tidify ( verilog,
current_indent = 0,
indent_width = 2 )
makes the generated verilog looks a bit better, may be subject to changes later

Definition at line 6 of file utils.py.

Variable Documentation

◆ debug

bool parselib.utils.debug = True

Definition at line 29 of file utils.py.