Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

expr_types.h

00001 #ifndef EXPR_TYPES_H
00002 #define EXPR_TYPES_H
00003 #include "param_types.h"
00004 
00005 #define CONST_STACK_ELEMENT 0
00006 #define EXPR_STACK_ELEMENT 1
00007 
00008 /* General Expression Type */
00009 typedef struct GEN_EXPR_T {
00010   int type;
00011   void * item;
00012 } gen_expr_t;
00013 
00014 typedef union TERM_T {
00015   double constant; /* static variable */
00016   struct PARAM_T * param; /* pointer to a changing variable */
00017 } term_t;
00018 
00019 /* Value expression, contains a term union */
00020 typedef struct VAL_EXPR_T {
00021   int type;
00022   term_t term;
00023 } val_expr_t;
00024 
00025 /* Infix Operator Function */
00026 typedef struct INFIX_OP_T {
00027   int type;
00028   int precedence;  
00029 } infix_op_t;
00030 
00031 /* A binary expression tree ordered by operator precedence */
00032 typedef struct TREE_EXPR_T {
00033   infix_op_t * infix_op; /* null if leaf */
00034   gen_expr_t * gen_expr;
00035   struct TREE_EXPR_T * left, * right;
00036 } tree_expr_t;
00037 
00038 /* A function expression in prefix form */
00039 typedef struct PREFUN_EXPR_T {
00040   double (*func_ptr)();
00041   int num_args;
00042   gen_expr_t ** expr_list;
00043 } prefun_expr_t;
00044 
00045 
00046 
00047 
00048 #endif

Generated on Tue Dec 20 10:14:57 2005 for vlc-0.8.4a by  doxygen 1.4.2