Defines | |
#define | wi_new tinyap_wi_new |
#define | wi_reset tinyap_wi_reset |
#define | wi_delete tinyap_wi_delete |
#define | wi_node tinyap_wi_node |
#define | wi_up tinyap_wi_up |
#define | wi_down tinyap_wi_down |
#define | wi_next tinyap_wi_next |
#define | wi_backup tinyap_wi_backup |
#define | wi_restore tinyap_wi_restore |
#define | wi_validate tinyap_wi_validate |
#define | wi_root tinyap_wi_root |
#define | wi_root tinyap_wi_root |
#define | wi_dup tinyap_wi_dup |
#define | wi_on_root tinyap_wi_on_root |
#define | wi_on_leaf tinyap_wi_on_leaf |
#define | wi_has_next tinyap_wi_has_next |
Functions | |
int | tinyap_node_is_nil (const ast_node_t) |
predicate "this node is nil" | |
int | tinyap_node_is_list (const ast_node_t) |
predicate "this node is a list" | |
unsigned int | tinyap_list_get_size (const ast_node_t) |
get the length of the list | |
ast_node_t | tinyap_list_get_element (const ast_node_t, int) |
access to the n-th element of this list | |
int | tinyap_node_is_string (const ast_node_t) |
predicate "this node is a string" | |
const char * | tinyap_node_get_string (const ast_node_t) |
access to the string value of this atom | |
ast_node_t | tinyap_node_get_operand (const ast_node_t, int) |
access to the n-th operand of this node ( (n+1)-th element of list) | |
int | tinyap_node_get_operand_count (const ast_node_t) |
get the number of operands in this node (count(list)-1) | |
const char * | tinyap_node_get_operator (const ast_node_t) |
get the operator label of this node | |
int | tinyap_node_get_row (const ast_node_t) |
get the row corresponding to this node in source text | |
int | tinyap_node_get_col (const ast_node_t) |
get the col corresponding to this node in source text | |
void | tinyap_serialize_to_file (const ast_node_t, const char *) |
serialize this node to the named file | |
const char * | tinyap_serialize_to_string (const ast_node_t) |
serialize this node into a new C string (must be freed by the user) | |
wast_t | tinyap_make_wast (const ast_node_t) |
make this AST walkable. | |
ast_node_t | tinyap_make_ast (const wast_t) |
make this walkable AST a serializable AST. | |
void | tinyap_free_wast (const wast_t) |
free this walkable AST. | |
wast_iterator_t | tinyap_wi_new (const wast_t) |
create an iterator on this AST. | |
wast_iterator_t | tinyap_wi_reset (wast_iterator_t) |
reset an iterator to its initial state (on root, backup cleared). | |
void | tinyap_wi_delete (wast_iterator_t) |
destroy an iterator on an AST. | |
wast_t | tinyap_wi_node (wast_iterator_t) |
get node under iterator | |
wast_iterator_t | tinyap_wi_up (wast_iterator_t) |
iterator jumps to parent | |
wast_iterator_t | tinyap_wi_down (wast_iterator_t) |
iterator jumps to first child | |
wast_iterator_t | tinyap_wi_next (wast_iterator_t) |
iterator jumps to next sibling | |
wast_iterator_t | tinyap_wi_backup (wast_iterator_t) |
backup iterator state | |
wast_iterator_t | tinyap_wi_restore (wast_iterator_t) |
restore iterator state | |
wast_iterator_t | tinyap_wi_validate (wast_iterator_t) |
forget previous backup | |
wast_t | tinyap_wi_root (wast_iterator_t) |
get iterator's root. | |
wast_t | tinyap_wi_parent (wast_iterator_t) |
get iterator's current parent. | |
wast_iterator_t | tinyap_wi_dup (const wast_iterator_t) |
predicate "iterator is on root", i.e. "NOT (node has a parent)" | |
int | tinyap_wi_on_root (wast_iterator_t) |
predicate "iterator is on root", i.e. "NOT (node has a parent)" | |
int | tinyap_wi_on_leaf (wast_iterator_t) |
predicate "iterator is on a leaf", i.e. "NOT (node has children)" | |
int | tinyap_wi_has_next (wast_iterator_t) |
predicate "iterator has a next sibling", i.e. "NOT (node is last child)" | |
const char * | tinyap_unparse (wast_t grammar, wast_t ast) |
Render the text buffer that generated the AST ast when parsed using grammar . | |
void * | tinyap_walk_output (const char *pilot_name, void *pilot_init_data) |
walk the current output using this named pilot with this init data. | |
void * | tinyap_walk (const wast_t subtree, const char *pilot_name, void *pilot_init_data) |
walk this subtree using this named pilot with this init data. |
void tinyap_free_wast | ( | const | wast_t | ) |
free this walkable AST.
ast_node_t tinyap_list_get_element | ( | const | ast_node_t, | |
int | ||||
) |
access to the n-th element of this list
Referenced by TinyaP::AstNode::getOperator(), and TinyaP::AstNode::isOp().
unsigned int tinyap_list_get_size | ( | const | ast_node_t | ) |
get the length of the list
ast_node_t tinyap_make_ast | ( | const | wast_t | ) |
make this walkable AST a serializable AST.
wast_t tinyap_make_wast | ( | const | ast_node_t | ) |
make this AST walkable.
int tinyap_node_get_col | ( | const | ast_node_t | ) |
get the col corresponding to this node in source text
Referenced by TinyaP::AstNode::getCol().
ast_node_t tinyap_node_get_operand | ( | const | ast_node_t, | |
int | ||||
) |
access to the n-th operand of this node ( (n+1)-th element of list)
int tinyap_node_get_operand_count | ( | const | ast_node_t | ) |
get the number of operands in this node (count(list)-1)
const char* tinyap_node_get_operator | ( | const | ast_node_t | ) |
get the operator label of this node
int tinyap_node_get_row | ( | const | ast_node_t | ) |
get the row corresponding to this node in source text
Referenced by TinyaP::AstNode::getRow().
const char* tinyap_node_get_string | ( | const | ast_node_t | ) |
access to the string value of this atom
Referenced by TinyaP::AstNode::getOperator(), and TinyaP::AstNode::getString().
int tinyap_node_is_list | ( | const | ast_node_t | ) |
predicate "this node is a list"
Referenced by TinyaP::AstNode::isList(), and TinyaP::AstNode::isOp().
int tinyap_node_is_nil | ( | const | ast_node_t | ) |
predicate "this node is nil"
Referenced by TinyaP::AstNode::isNil().
int tinyap_node_is_string | ( | const | ast_node_t | ) |
predicate "this node is a string"
Referenced by TinyaP::AstNode::isOp(), and TinyaP::AstNode::isString().
void tinyap_serialize_to_file | ( | const | ast_node_t, | |
const char * | ||||
) |
serialize this node to the named file
Referenced by TinyaP::AstNode::toFile().
const char* tinyap_serialize_to_string | ( | const | ast_node_t | ) |
serialize this node into a new C string (must be freed by the user)
Referenced by TinyaP::AstNode::toString().
Render the text buffer that generated the AST ast
when parsed using grammar
.
void* tinyap_walk | ( | const wast_t | subtree, | |
const char * | pilot_name, | |||
void * | pilot_init_data | |||
) |
walk this subtree using this named pilot with this init data.
void* tinyap_walk_output | ( | const char * | pilot_name, | |
void * | pilot_init_data | |||
) |
walk the current output using this named pilot with this init data.
wast_iterator_t tinyap_wi_backup | ( | wast_iterator_t | ) |
backup iterator state
void tinyap_wi_delete | ( | wast_iterator_t | ) |
destroy an iterator on an AST.
wast_iterator_t tinyap_wi_down | ( | wast_iterator_t | ) |
iterator jumps to first child
wast_iterator_t tinyap_wi_dup | ( | const | wast_iterator_t | ) |
predicate "iterator is on root", i.e. "NOT (node has a parent)"
int tinyap_wi_has_next | ( | wast_iterator_t | ) |
predicate "iterator has a next sibling", i.e. "NOT (node is last child)"
wast_iterator_t tinyap_wi_new | ( | const | wast_t | ) |
create an iterator on this AST.
wast_iterator_t tinyap_wi_next | ( | wast_iterator_t | ) |
iterator jumps to next sibling
wast_t tinyap_wi_node | ( | wast_iterator_t | ) |
get node under iterator
int tinyap_wi_on_leaf | ( | wast_iterator_t | ) |
predicate "iterator is on a leaf", i.e. "NOT (node has children)"
int tinyap_wi_on_root | ( | wast_iterator_t | ) |
predicate "iterator is on root", i.e. "NOT (node has a parent)"
wast_t tinyap_wi_parent | ( | wast_iterator_t | ) |
get iterator's current parent.
wast_iterator_t tinyap_wi_reset | ( | wast_iterator_t | ) |
reset an iterator to its initial state (on root, backup cleared).
wast_iterator_t tinyap_wi_restore | ( | wast_iterator_t | ) |
restore iterator state
wast_t tinyap_wi_root | ( | wast_iterator_t | ) |
get iterator's root.
wast_iterator_t tinyap_wi_up | ( | wast_iterator_t | ) |
iterator jumps to parent
wast_iterator_t tinyap_wi_validate | ( | wast_iterator_t | ) |
forget previous backup