Added upstream from http://ftp.icm.edu.pl/pub/loglan/
[loglan.git] / loglan96 / loglan93 / tstexpr.cc
1 #include <String.h>
2 #include <iostream.h>
3 #include "Objects.h"
4 #include "Expr.h"
5
6 Location ThisPlace(1,2,4,5);
7
8 main()
9 {
10
11 // Test : building the expression 'A := B + ( 1 * 4 );'
12
13   Expression *TheExpr;
14
15   TheExpr = new Affectation( new Identifier( new String("A")),
16                              new ArithOperator( new Identifier( new String("B")),
17                                                 new ArithOperator( new IntegerConstant(1), new IntegerConstant(4), IntegerExpr, Multiply ),
18                                                 IntegerExpr, Plus ),
19                              Instruction );
20
21   cout << "The Expr is : \n";
22   TheExpr->Print( cout );
23   cout << '\n';
24
25 }