Verilog Parser
|
Represents nodes at the very top of the source tree. More...
Data Structures | |
struct | ast_node |
Node type that forms the tree. More... | |
struct | ast_source_item |
Contains a source item and it's type. More... | |
struct | verilog_source_tree |
Top level container for parsed source code. More... | |
Enumerations | |
enum | ast_node_type { ATTRIBUTE_LIST, EXPRESSION, IDENTIFIER, MODULE, NONE } |
Enum type describing the data value that an AST node holds. More... | |
enum | ast_source_item_type { SOURCE_MODULE = 0, SOURCE_UDP = 1 } |
Describes the type of a item in the list of source entries. More... | |
Functions | |
ast_source_item * | ast_new_source_item (ast_source_item_type type) |
Creates and returns a new source item representation. More... | |
ast_node * | ast_node_new () |
Creates a new empty ast_node and returns it. More... | |
void | verilog_free_source_tree (verilog_source_tree *tofree) |
Releases a source tree object from memory. More... | |
verilog_source_tree * | verilog_new_source_tree () |
Creates and returns a new, empty source tree. More... | |
Variables | |
verilog_source_tree * | yy_verilog_source_tree |
This is where we put all of the parsed constructs. More... | |
Represents nodes at the very top of the source tree.
These nodes won't always correspond to a syntactic construct, and are used to represent a collection of other nodes.
enum ast_node_type |
Enum type describing the data value that an AST node holds.
Enumerator | |
---|---|
ATTRIBUTE_LIST |
A design attribute. ast_node_attributes_t. |
EXPRESSION |
A constant or variable expression. |
NONE |
The node has no stored data type. |
enum ast_source_item_type |
ast_source_item* ast_new_source_item | ( | ast_source_item_type | type | ) |
Creates and returns a new source item representation.
[in] | type | - The type of the source item to be represented. |
ast_node* ast_node_new | ( | ) |
Creates a new empty ast_node and returns it.
void verilog_free_source_tree | ( | verilog_source_tree * | tofree | ) |
Releases a source tree object from memory.
Frees the top level source tree object, and all of it's child ast_* objects by calling the ast_free_all function.
[in] | tofree | - The source tree to be free'd |
[in] | tofree | - The source tree to be free'd |
verilog_source_tree* verilog_new_source_tree | ( | ) |
Creates and returns a new, empty source tree.
This should be called ahead of parsing anything, so we will have an object to put parsed constructs into.
verilog_source_tree* yy_verilog_source_tree |
This is where we put all of the parsed constructs.
This is where we put all of the parsed constructs.
This is a global variable, initialised prior to calling the verilog_parse function, into which all objects the parser finds are stored.