Verilog Parser

Expresses primary terms of expressions. These can be sub-expressions, numbers, identifiers etc. More...

Data Structures

struct  ast_primary
 Stores the type and value of an AST primary expression. More...
 
union  ast_primary_value
 The expression primary can produce several different sub-expressions: More...
 

Enumerations

enum  ast_primary_type { CONSTANT_PRIMARY, PRIMARY, MODULE_PATH_PRIMARY }
 Describes the kind of expression primary being represented, and hence the sort of expression we are dealing with.
 
enum  ast_primary_value_type {
  PRIMARY_NUMBER, PRIMARY_IDENTIFIER, PRIMARY_CONCATENATION, PRIMARY_FUNCTION_CALL,
  PRIMARY_MINMAX_EXP, PRIMARY_MACRO_USAGE
}
 The kind of production the expression primary holds.
 

Functions

ast_primaryast_new_constant_primary (ast_primary_value_type type)
 Creates a new ast primary which is part of a constant expression tree with the supplied type and value. More...
 
ast_primaryast_new_module_path_primary (ast_primary_value_type type)
 Creates a new ast primary which is part of a constant expression tree with the supplied type and value. More...
 
ast_primaryast_new_primary (ast_primary_value_type type)
 Creates a new ast primary which is part of an expression tree with the supplied type and value. More...
 
ast_primaryast_new_primary_function_call (ast_function_call *call)
 Creates a new AST primary wrapper around a function call. More...
 
char * ast_primary_tostring (ast_primary *p)
 A utility function for converting an ast expression primaries back into a string representation. More...
 

Detailed Description

Expresses primary terms of expressions. These can be sub-expressions, numbers, identifiers etc.

Function Documentation

ast_primary* ast_new_constant_primary ( ast_primary_value_type  type)

Creates a new ast primary which is part of a constant expression tree with the supplied type and value.

Parameters
[in]type- Self explanatory
ast_primary* ast_new_module_path_primary ( ast_primary_value_type  type)

Creates a new ast primary which is part of a constant expression tree with the supplied type and value.

Parameters
[in]type- Self explanatory
ast_primary* ast_new_primary ( ast_primary_value_type  type)

Creates a new ast primary which is part of an expression tree with the supplied type and value.

Parameters
[in]type- Self explanatory
ast_primary* ast_new_primary_function_call ( ast_function_call *  call)

Creates a new AST primary wrapper around a function call.

Parameters
[in]call- The AST node representing a function call.
char* ast_primary_tostring ( ast_primary p)

A utility function for converting an ast expression primaries back into a string representation.

Parameters
[in]p- The expression primary to turn into a string.