#ifndef __SYNTREE_H__ #define __SYNTREE_H__ struct cvorKonstante { int vrednost; }; struct cvorPromenljive { char ime[64]; }; struct cvorOperatora { int operator; int brojOperanada; struct cvor** operandi; }; typedef enum {KONST, PROM, OP} tipCvora; struct cvor { tipCvora tip; union { struct cvorKonstante konst; struct cvorPromenljive prom; struct cvorOperatora op; } c; }; typedef struct cvor cvor; cvor* napraviCvorKonstante(int vrednost); cvor* napraviCvorPromenljive(char* s); cvor* napraviCvorOperatora0(int operator) ; cvor* napraviCvorOperatora1(int operator, cvor* op1) ; cvor* napraviCvorOperatora2(int operator, cvor* op1, cvor* op2) ; void ispisi(cvor*); void kompiliraj(cvor *); int interpretiraj(cvor *); #endif