Verilog Parser

Objects used to represent individual numbers. More...

Data Structures

struct  ast_number
 Stores the base, value and width (in bits) of a number. More...
 

Enumerations

enum  ast_number_base { BASE_BINARY, BASE_OCTAL, BASE_DECIMAL, BASE_HEX }
 Base value of a number representation.
 
enum  ast_number_representation { REP_BITS, REP_INTEGER, REP_FLOAT }
 How is the number represented? More...
 

Functions

ast_number * ast_new_number (ast_number_base base, ast_number_representation representation, char *digits)
 Creates a new number representation object. More...
 
char * ast_number_tostring (ast_number *n)
 A utility function for converting an ast number into a string. More...
 

Detailed Description

Objects used to represent individual numbers.

Enumeration Type Documentation

How is the number represented?

Enumerator
REP_BITS 

For numbers specified per digit.

REP_INTEGER 

For "Integer" typed numbers".

REP_FLOAT 

For "real" typed numbers.

Function Documentation

ast_number* ast_new_number ( ast_number_base  base,
ast_number_representation  representation,
char *  digits 
)

Creates a new number representation object.

Todo:
Implement proper representation converstion.
Parameters
baseWhat is the base of the number.
representationHow to interepret digits.
digitsThe string token representing the number.
char* ast_number_tostring ( ast_number *  n)

A utility function for converting an ast number into a string.

Parameters
[in]n- The number to turn into a string.