next up previous
Next: The file expressionTree.l Up: A detailed example Previous: A detailed example

The file type.h

// tNodeType: enumarate type describing the type of the node
typedef enum {t_number, t_id, t_plus, t_times} tNodeType;

// definition of the Node 
struct _tNode {
  tNodeType type;
  int number;
  char id;
  struct _tNode *left, *right;
};

// struct _Node and tNode are identical
typedef struct _tNode tNode;


next up previous
Next: The file expressionTree.l Up: A detailed example Previous: A detailed example
Marc Moreno Maza
2004-12-02