Package grc_gnuradio.utils.expr_utils


Classes

class  graph

Functions

def expr_split
def expr_prepend
def get_variable_dependencies
def get_graph
def sort_variables

Variables

string VAR_CHARS = '_'


Detailed Description

Utility functions to comprehend variable expressions.
Author:
Josh Blum

Function Documentation

def grc_gnuradio.utils.expr_utils.expr_prepend (   expr,
  vars,
  prepend 
)

Search for vars in the expression and add the prepend.

Parameters:
expr an expression string
vars a list of variable names
prepend the prepend string
Returns:
a new expression with the prepend

Definition at line 81 of file expr_utils.py.

def grc_gnuradio.utils.expr_utils.expr_split (   expr  ) 

Split up an expression by non alphanumeric characters, including underscore. Leave strings in-tact. TODO ignore escaped quotes, use raw strings.

Parameters:
expr an expression string
Returns:
a list of string tokens that form expr

Definition at line 55 of file expr_utils.py.

def grc_gnuradio.utils.expr_utils.get_graph (   exprs  ) 

Get a graph representing the variable dependencies

Parameters:
exprs a mapping of variable name to expression
Returns:
a graph of variable deps

Definition at line 104 of file expr_utils.py.

def grc_gnuradio.utils.expr_utils.get_variable_dependencies (   expr,
  vars 
)

Return a set of variables used in this expression.

Parameters:
expr an expression string
vars a list of variable names
Returns:
a subset of vars used in the expression

Definition at line 94 of file expr_utils.py.

def grc_gnuradio.utils.expr_utils.sort_variables (   exprs  ) 

Get a list of variables in order of dependencies.

Parameters:
exprs a mapping of variable name to expression
Returns:
a list of variable names
Exceptions:
AssertionError circular dependencies

Definition at line 119 of file expr_utils.py.


Variable Documentation

string grc_gnuradio::utils::expr_utils.VAR_CHARS = '_' [static]

Definition at line 24 of file expr_utils.py.


Generated on Sat Aug 23 02:00:12 2008 for GNU Radio Companion by  doxygen 1.5.4