Verilog Parser
ast_expression Struct Reference

Storage type for an entire expression / subexpression tree. More...

#include <verilog_ast.h>

Data Fields

ast_node_attributes * attributes
 Additional expression attributes.
 
ast_expression * aux
 Optional auxiliary/predicate.
 
ast_boolean constant
 True iff constant_expression.
 
ast_expression * left
 LHS of operation.
 
ast_metadata meta
 Node metadata.
 
ast_operator operation
 What are we doing?
 
ast_primaryprimary
 Valid IFF type == PRIMARY_EXPRESSION.
 
ast_expression * right
 RHS of operation.
 
ast_string string
 The string constant. Valid IFF type == STRING_EXPRESSION.
 
ast_expression_type type
 What sort of expression is this?
 

Detailed Description

Storage type for an entire expression / subexpression tree.

Expression type over a struct.

Each expression node has left and right children (unless it is a leaf) and an operation. The idea being that if the children are primaries, then we extract their value, perform the operation described in this node, and return up the expression tree, or recurse into a child expression as appropriate.

Todo:
This part of the tree (and sub parts) is currently quite messy. When I come to actually using this for something practicle, I may end up re-writing it. That will be post the first "release" though.

The documentation for this struct was generated from the following file: