Subversion Repositories Vertical

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 mjames 1
/* expression.h */
2
/* contains the type declarations for expression handling information  */
3
/*
4
 * $Id: expression_main.c,v 1.1.1.1 2003/11/04 23:34:56 mjames Exp $
5
 *
6
 * $Log: expression_main.c,v $
7
 * Revision 1.1.1.1  2003/11/04 23:34:56  mjames
8
 * Imported into local repositrory
9
 *
10
 * Revision 1.3  2001/10/31 22:20:04  mjames
11
 * Tidying up problematical comments caused by CVS
12
 * 'intelligent' comment guessing
13
 *
14
 * Revision 1.2  2001/06/06 12:10:23  mjames
15
 * Move from HPUX
16
 *
17
 * Revision 1.1.1.1  2000/10/19 21:58:37  mjames
18
 * Mike put it here
19
 *
20
 *
21
 * Revision 1.19  2000/10/04  10:37:04  10:37:04  mjames (Mike James)
22
 * Modified for Vertical2 : support COMPONENTS and SIGNALS
23
 *
24
 * Revision 1.19  2000/10/04  10:37:04  10:37:04  mjames (Mike James)
25
 * Part of Release PSAVAT01
26
 *
27
 * Revision 1.18  2000/10/02  11:04:12  11:04:12  mjames (Mike James)
28
 * new_vhdl
29
 *
30
 * Revision 1.17  2000/09/27  14:42:12  14:42:12  mjames (Mike James)
31
 * Part of Release Sep_27_ST_2000
32
 *
33
 * Revision 1.16  2000/09/21  10:15:42  10:15:42  mjames (Mike James)
34
 * Part of Release Sep21Alpha
35
 *
36
 * Revision 1.15  2000/08/25  09:57:10  09:57:10  mjames (Mike James)
37
 * Part of Release Aug25_alpha
38
 *
39
 * Revision 1.14  2000/08/16  08:57:27  08:57:27  mjames (Mike James)
40
 * Part of Release CD01_Aug2000
41
 *
42
 * Revision 1.13  2000/08/14  14:45:08  14:45:08  mjames (Mike James)
43
 * Part of Release Aug_14_2000
44
 *
45
 * Revision 1.12  2000/08/11  08:30:29  08:30:29  mjames (Mike James)
46
 * Part of Release Aug_11_2000
47
 *
48
 * Revision 1.11  2000/08/09  10:31:42  10:31:42  mjames (Mike James)
49
 * Part of Release Aug__9_2000
50
 *
51
 * Revision 1.10  2000/05/31  11:42:51  11:42:51  mjames (Mike James)
52
 * Part of Release May_31_2000
53
 *
54
 * Revision 1.9  2000/05/08  17:01:34  17:01:34  mjames (Mike James)
55
 * Part of Release May__8_2000
56
 *
57
 * Revision 1.8  2000/05/08  16:59:27  16:59:27  mjames (Mike James)
58
 * Part of Release May__8_2000
59
 *
60
 * Revision 1.7  2000/05/08  16:57:04  16:57:04  mjames (Mike James)
61
 * Part of Release May__8_2000
62
 *
63
 * Revision 1.6  2000/03/08  16:18:58  16:18:58  mjames (Mike James)
64
 * New version including PC
65
 *
66
 * Revision 1.3  2000/01/20  15:58:43  15:58:43  mjames (Mike James)
67
 * Part of Release R22
68
 *
69
 * Revision 1.2  99/12/22  11:15:23  11:15:23  mjames (Mike James)
70
 * Part of Release Dec_22_1999
71
 *
72
 * Revision 1.1  99/06/25  14:35:16  14:35:16  mjames (Mike James)
73
 * Initial revision
74
 *
75
 *  */
76
#include "acf_yacc_tab.h"
77
#include "database.h"
78
#include "expression.h"
79
#include "generic.h"
80
 
81
#include <stdio.h>
82
#include <stdlib.h>
83
 
84
int main (char *argv[], int argc)
85
{
86
        expression_t *p, *q;
87
        p = compile_constant (12);
88
        q = compile_constant (32);
89
        p = compile_expression (LBRK, p, NULL);
90
        q = compile_expression (UMINUS, q, NULL);
91
        p = compile_expression ('*', p, q);
92
        q = compile_constant (3);
93
        p = compile_expression ('+', p, q);
94
        q = compile_constant (5);
95
        p = compile_expression (TO_POW, p, q);
96
        printf ("expression test bench ...\n");
97
        print_expression (stdout, p);
98
        printf ("\n value = %d\n", eval_expression (p));
99
 
100
        printf ("\n ... End of test\n");
101
}