Verilog Parser

Concatenations of expressions, l-values, variables, nets and module paths. More...

Data Structures

struct  ast_concatenation
 Fully describes a concatenation in terms of type and data. More...
 

Enumerations

enum  ast_concatenation_type {
  CONCATENATION_EXPRESSION, CONCATENATION_CONSTANT_EXPRESSION, CONCATENATION_NET, CONCATENATION_VARIABLE,
  CONCATENATION_MODULE_PATH
}
 Describes the type of concatenation being dealt with. More...
 

Functions

void ast_extend_concatenation (ast_concatenation *element, ast_expression *repeat, void *data)
 Adds a new data element on to the front of a concatenation. More...
 
ast_concatenation * ast_new_concatenation (ast_concatenation_type type, ast_expression *repeat, void *first_value)
 Creates a new AST concatenation element with the supplied type and initial starting value. More...
 
ast_concatenation * ast_new_empty_concatenation (ast_concatenation_type type)
 Creates and returns a new empty concatenation of the specified type. More...
 

Detailed Description

Concatenations of expressions, l-values, variables, nets and module paths.

Enumeration Type Documentation

Describes the type of concatenation being dealt with.

Enumerator
CONCATENATION_EXPRESSION 

A set of expressions concatenated.

CONCATENATION_CONSTANT_EXPRESSION 

Constant expressions.

CONCATENATION_NET 

Net name concatenation (lvalue)

CONCATENATION_VARIABLE 

Variable name concatenation (lvalue)

CONCATENATION_MODULE_PATH 

Module path concatenation.

Function Documentation

void ast_extend_concatenation ( ast_concatenation *  element,
ast_expression *  repeat,
void *  data 
)

Adds a new data element on to the front of a concatenation.

Parameters
[in,out]element- THe concantenation being extended,
[in]repeat- Is the concatenation repeated?
[in]data- The item to add to the concatenation sequence.

Adds a new data element on to the front of a concatenation.

Appends to the front because this naturally follows the behaviour of a left-recursive grammar.

Todo:
Better implement repetition of elements.
ast_concatenation* ast_new_concatenation ( ast_concatenation_type  type,
ast_expression *  repeat,
void *  first_value 
)

Creates a new AST concatenation element with the supplied type and initial starting value.

Parameters
[in]repeat- Used for replications or multiple_concatenation
[in]type- What sort of values are being concatenated?
[in]first_value- The first element of the concatentation.

Depending on the type supplied, the type of first_value should be:

  • CONCATENATION_EXPRESSION : ast_expression
  • CONCATENATION_CONSTANT_EXPRESSION : ast_expression
  • CONCATENATION_NET : ast_identifier
  • CONCATENATION_VARIABLE : ast_identifer
  • CONCATENATION_MODULE_PATH : ast_identifier
Parameters
[in]repeat- Used for replications or multiple_concatenation.
[in]type- The kind of value being concatenated.
[in]first_value- The first value at the LHS of the concatenation.

Depending on the type supplied, the type of first_value should be:

  • CONCATENATION_EXPRESSION : ast_expression
  • CONCATENATION_CONSTANT_EXPRESSION : ast_expression
  • CONCATENATION_NET : TBD
  • CONCATENATION_VARIABLE : TBD
  • CONCATENATION_MODULE_PATH : TBD
    Todo:
    Better implement repetition of elements.
ast_concatenation* ast_new_empty_concatenation ( ast_concatenation_type  type)

Creates and returns a new empty concatenation of the specified type.

Parameters
[in]type- What sort of values are being concatenated?