c_cons.h File Reference

Go to the source code of this file.

Typedefs

typedef void CCell

Functions

CCellc_make_int (const int i)
 Make an int cell.
CCellc_make_double (const double d)
 Make a double cell.
CCellc_make_symbol (const char *const s)
 Make a symbol cell.
CCellc_cons (CCell *const my_car, CCell *const my_cdr)
 Make a conspair cell.
void c_delete (CCell *tcell)
 Delete the Cell tcell.


Detailed Description

Encapsulates an abstract interface layer for a cons list ADT, without using member functions. Makes no assumptions about what kind of concrete type Cell will be defined to be. This is a wrapper file for the C++ functions that are used in the C-based bison parser, therefore, for all the functions that you need from your previous C++ implementation from last semester should be wrapped up to be linked by C compilers.

Typedef Documentation

typedef void CCell


Function Documentation

CCell* c_cons ( CCell *const   my_car,
CCell *const   my_cdr 
)

Make a conspair cell.

Parameters:
my_car The initial car pointer to be stored in the new cell.
my_cdr The initial cdr pointer to be stored in the new cell.

References cons().

void c_delete ( CCell tcell  ) 

Delete the Cell tcell.

Parameters:
tcell The Cell to be deleted.

CCell* c_make_double ( const double  d  ) 

Make a double cell.

Parameters:
d The initial double value to be stored in the new cell.

References make_double().

CCell* c_make_int ( const int  i  ) 

Make an int cell.

Parameters:
i The initial int value to be stored in the new cell.

References make_int().

CCell* c_make_symbol ( const char *const   s  ) 

Make a symbol cell.

Parameters:
s The initial symbol name to be stored in the new cell.

References make_symbol().


Generated on Fri Nov 16 15:34:20 2012 for a1 by  doxygen 1.5.8