Verilog Parser
|
Data Structures | |
struct | ast_conditional_statement |
Describes a single if-then-do statement. More... | |
struct | ast_if_else |
Describes a complete set of if-elseif-else statements. More... | |
Functions | |
void | ast_extend_if_else (ast_if_else *conditional_statements, ast_list *new_statement) |
Adds an additional conditional (ha..) to an existing if-else statement. More... | |
ast_conditional_statement * | ast_new_conditional_statement (ast_statement *statement, ast_expression *condition) |
Creates and returns a new conditional statement. More... | |
ast_if_else * | ast_new_if_else (ast_conditional_statement *if_condition, ast_statement *else_condition) |
Creates a new if-then-else-then statement. More... | |
void ast_extend_if_else | ( | ast_if_else * | conditional_statements, |
ast_list * | new_statements | ||
) |
Adds an additional conditional (ha..) to an existing if-else statement.
conditional_statements | - the existing if-else tree. |
new_statement | - The new statement to add at the end of the existing if-then conditions, but before any else_condtion. |
ast_conditional_statement* ast_new_conditional_statement | ( | ast_statement * | statement, |
ast_expression * | condition | ||
) |
Creates and returns a new conditional statement.
statement | - what to run if the condition holds true. |
condtion | - the condition on which statement is run. |
ast_if_else* ast_new_if_else | ( | ast_conditional_statement * | if_condition, |
ast_statement * | else_condition | ||
) |
Creates a new if-then-else-then statement.
if_condition | - the conditional statement. |
else_condition | - What to do if no conditional statements are executed. This can be NULL. |
This node also supports "if then elseif then else then" statements, and uses the ast_extend_if_else function to append a new ast_conditional_statement to the end of a list of if-else conditions. Priority of exectuion is given to items added first.