Verilog Parser

Custom type declarations. More...

Data Structures

struct  ast_net_declaration
 Describes a single net declaration. More...
 
struct  ast_reg_declaration
 Describes a single reg declaration. More...
 
struct  ast_type_declaration
 Fully describes the declaration of elements one might find inside a module. More...
 
struct  ast_var_declaration
 Describes a simple set of declarations of a particular type. More...
 

Enumerations

enum  ast_declaration_type {
  DECLARE_EVENT, DECLARE_GENVAR, DECLARE_INTEGER, DECLARE_TIME,
  DECLARE_REALTIME, DECLARE_REAL, DECLARE_NET, DECLARE_REG,
  DECLARE_UNKNOWN
}
 Describes the datatype of the construct being declared. More...
 

Functions

ast_listast_new_net_declaration (ast_type_declaration *type_dec)
 Creates a new net declaration object. More...
 
ast_listast_new_reg_declaration (ast_type_declaration *type_dec)
 Creates a new reg declaration object. More...
 
ast_type_declarationast_new_type_declaration (ast_declaration_type type)
 Creates and returns a node to represent the declaration of a new module item construct. More...
 
ast_listast_new_var_declaration (ast_type_declaration *type_dec)
 Creates a new variable declaration object. More...
 

Detailed Description

Custom type declarations.

Enumeration Type Documentation

Describes the datatype of the construct being declared.

Enumerator
DECLARE_UNKNOWN 

For when we don't know the type when instancing.

Function Documentation

ast_list* ast_new_net_declaration ( ast_type_declaration type_dec)

Creates a new net declaration object.

Turns a generic "type declaration" object into a net_declration object and discards un-needed member fields.

Returns
A set of ast_net_declaration types as a list, one for each identifer in the original type declaration object.
ast_list* ast_new_reg_declaration ( ast_type_declaration type_dec)

Creates a new reg declaration object.

Turns a generic "type declaration" object into a reg_declration object and discards un-needed member fields.

Returns
A set of ast_reg_declaration types as a list, one for each identifer in the original type declaration object.
ast_type_declaration* ast_new_type_declaration ( ast_declaration_type  type)

Creates and returns a node to represent the declaration of a new module item construct.

Parameters
[in]type- What sort of item is contained in the returned structure. From this, we know which members of the ast_type_declaration make sense and are safe to access.

Because of the complex nature of the grammar for these declarations, (bourne from the number of optional modifiers) no single constructor function is provided. Rather, one can create a new type declaration of a known type, but must otherwise fill out the data members as they go along. All pointer members are initialised to NULL, and all boolean members will initially be false.

Because of the complex nature of the grammar for these declarations, (bourne from the number of optional modifiers) no single constructor function is provided. Rather, one can create a new type declaration of a known type, but must otherwise fill out the data members as they go along. All pointer members are initialised to NULL, and all boolean members will initially be false.

ast_list* ast_new_var_declaration ( ast_type_declaration type_dec)

Creates a new variable declaration object.

Turns a generic "var declaration" object into a var_declration object and discards un-needed member fields.

Returns
A set of ast_var_declaration types as a list, one for each identifer in the original type declaration object.