Grid Community Toolkit
6.2.1705709074 (tag: v6.2.20240202)
|
RSL Memory Management. More...
Functions | |
globus_rsl_t * | globus_rsl_copy_recursive (globus_rsl_t *ast_node) |
Create a deep copy of an RSL syntax tree. More... | |
globus_rsl_value_t * | globus_rsl_value_copy_recursive (globus_rsl_value_t *globus_rsl_value_ptr) |
Create a deep copy of an RSL value. More... | |
int | globus_rsl_value_free (globus_rsl_value_t *val) |
Free an RSL value node. More... | |
int | globus_rsl_free (globus_rsl_t *ast_node) |
Free an RSL syntax tree node. More... | |
int | globus_rsl_value_free_recursive (globus_rsl_value_t *globus_rsl_value_ptr) |
Free an RSL value and all its child nodes. More... | |
int | globus_rsl_free_recursive (globus_rsl_t *ast_node) |
Free an RSL syntax tree and all its child nodes. More... | |
int | globus_rsl_value_list_literal_replace (globus_list_t *value_list, char *string_value) |
Replace the first value in a value list with a literal. More... | |
int | globus_rsl_value_eval (globus_rsl_value_t *ast_node, globus_symboltable_t *symbol_table, char **string_value, int rsl_substitution_flag) |
Evaluate RSL substitions in an RSL value node. More... | |
int | globus_rsl_eval (globus_rsl_t *ast_node, globus_symboltable_t *symbol_table) |
Evaluate an RSL syntax tree. More... | |
RSL Memory Management.
globus_rsl_t* globus_rsl_copy_recursive | ( | globus_rsl_t * | ast_node | ) |
Create a deep copy of an RSL syntax tree.
The globus_rsl_copy_recursive() function performs a deep copy of the RSL syntax tree pointed to by the ast_node parameter. All RSL nodes, value nodes, variable names, attributes, and literals will be copied to the return value.
ast_node | An RSL syntax tree to copy. |
int globus_rsl_eval | ( | globus_rsl_t * | ast_node, |
globus_symboltable_t * | symbol_table | ||
) |
Evaluate an RSL syntax tree.
The globus_rsl_eval() function modifies the RSL parse tree pointed to by its ast_node parameter by replacing all RSL substitution variable reference nodes with the literal values those variables evaluate to based on the current scope of the symbol table pointed to by the symbol_table parameter. It also combines string concatenations into literal string values. Any nodes which are replaced by this function are freed using globus_rsl_value_free_recursive().
ast_node | A pointer to the RSL syntax tree to evaluate. |
symbol_table | A symbol table containing current definitions of the RSL substitutions which can occur in this evaluation scope. |
int globus_rsl_free | ( | globus_rsl_t * | ast_node | ) |
Free an RSL syntax tree node.
The globus_rsl_free() function frees the RSL syntax tree node pointed to by the ast_node parameter. This only frees the RSL syntax tree node itself, and not any boolean operands, relation names, or values associated with the node.
ast_node | The RSL syntax tree node to free. |
int globus_rsl_free_recursive | ( | globus_rsl_t * | ast_node | ) |
Free an RSL syntax tree and all its child nodes.
The globus_rsl_free_recursive() function frees the RSL syntax tree pointed to by the ast_node parameter, including all boolean operands, attribute names, and values. Any pointers to these are no longer valid after globus_rsl_free_recursive() returns.
ast_node | An RSL parse tree to free. |
globus_rsl_value_t* globus_rsl_value_copy_recursive | ( | globus_rsl_value_t * | globus_rsl_value_ptr | ) |
Create a deep copy of an RSL value.
The globus_rsl_value_copy_recursive() function performs a deep copy of the RSL value pointed to by the globus_rsl_value_ptr parameter. All variable names, attributes, literals, and value lists will be copied to the return value.
globus_rsl_value_ptr | A pointer to an RSL value to copy. |
int globus_rsl_value_eval | ( | globus_rsl_value_t * | ast_node, |
globus_symboltable_t * | symbol_table, | ||
char ** | string_value, | ||
int | rsl_substitution_flag | ||
) |
Evaluate RSL substitions in an RSL value node.
The globus_rsl_value_eval() function modifies the value pointed to by its ast_node parameter by replacing all RSL substitution variable reference nodes with the literal values those variables evaluate to based on the current scope of the symbol table pointed to by the symbol_table parameter. It also combines string concatenations into literal string values. Any nodes which are replaced by this function are freed using globus_rsl_value_free_recursive().
ast_node | A pointer to the RSL value node to evaluate. |
symbol_table | A symbol table containing current definitions of the RSL substitutions which can occur in this evaluation scope. |
string_value | An output parameter which is set to point to the value of the string returned by evaluating the value node pointed to by ast_node if it evaluates to a literal value. list pointed to by the value_list parameter. |
rsl_substitution_flag | A flag indicating whether the node pointed to by the ast_node parameter defines RSL substition variables. |
int globus_rsl_value_free | ( | globus_rsl_value_t * | val | ) |
Free an RSL value node.
The globus_rsl_value_free() function frees the RSL value pointed to by the val parameter. This only frees the RSL value node itself, and not any sequence or string values associated with that node.
val | The RSL value node to free. |
int globus_rsl_value_free_recursive | ( | globus_rsl_value_t * | globus_rsl_value_ptr | ) |
Free an RSL value and all its child nodes.
The globus_rsl_free_recursive() function frees the RSL value node pointed to by the globus_rsl_value_ptr, including all literal strings, variable names, and value sequences. Any pointers to these are no longer valid after globus_rsl_value_free_recursive() returns.
globus_rsl_value_ptr | An RSL value node to free. |
int globus_rsl_value_list_literal_replace | ( | globus_list_t * | value_list, |
char * | string_value | ||
) |
Replace the first value in a value list with a literal.
The globus_rsl_value_list_literal_replace() function replaces the first value in the list pointed to by the value_list parameter with a new value node that is a literal string node pointing to the value of the string_value parameter, freeing the old value.
value_list | The RSL value list to modify by replacing its first element. |
string_value | The new string value to use as a literal first element of the list pointed to by the value_list parameter. |