Last change
on this file since 681 was
681,
checked in by orlov, 18 years ago
|
- Test for the assignments compilation correctness
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
File size:
920 bytes
|
Line | |
---|
1 | #include <rf_core.hh> |
---|
2 | #include <refal/StdIO.hh> |
---|
3 | |
---|
4 | namespace refal |
---|
5 | { |
---|
6 | |
---|
7 | using namespace rfrt; |
---|
8 | |
---|
9 | namespace assign1 |
---|
10 | { |
---|
11 | |
---|
12 | RF_DECL (Main); |
---|
13 | |
---|
14 | } |
---|
15 | |
---|
16 | namespace assign1 |
---|
17 | { |
---|
18 | |
---|
19 | static const Expr _c_0 = Word::create_expr ("A") + Word::create_expr ("B"); |
---|
20 | |
---|
21 | static const Expr _c_1 = Expr (_c_0, 1, 1); |
---|
22 | |
---|
23 | static const Expr _c_2 = Expr (_c_0, 0, 1); |
---|
24 | |
---|
25 | RF_FUNC (Main, (), (RF_RES _v_res1)) |
---|
26 | Expr _ve_1 (_c_0); |
---|
27 | Expr _vt_1 (_c_1); |
---|
28 | Expr _vt_2 (_vt_1); |
---|
29 | Expr _v_aux1 (_vt_2); |
---|
30 | _vt_2 = _vt_1; |
---|
31 | _vt_1 = _v_aux1; |
---|
32 | Expr _vt_3 (_c_1); |
---|
33 | Expr _vt_4 (_vt_1); |
---|
34 | _vt_1 = _c_2; |
---|
35 | _vt_3 = (_vt_1 + _vt_3) (); |
---|
36 | _v_aux1 = _vt_2; |
---|
37 | _vt_2 = _vt_1; |
---|
38 | _vt_1 = (_vt_1 + _v_aux1) (); |
---|
39 | _v_aux1 = _vt_2; |
---|
40 | _vt_2 = _vt_1; |
---|
41 | _vt_1 = _vt_3; |
---|
42 | _vt_3 = _v_aux1; |
---|
43 | _v_aux1 = _vt_1; |
---|
44 | _vt_1 = (_vt_2 + _vt_3) (); |
---|
45 | Expr _v_aux2 (_vt_2); |
---|
46 | _vt_2 = (_v_aux1 + _vt_3) (); |
---|
47 | _vt_3 = (_v_aux1 + _v_aux2) (); |
---|
48 | _v_res1 = empty; |
---|
49 | RF_END |
---|
50 | |
---|
51 | } |
---|
52 | |
---|
53 | rfrt::Entry rf_entry (assign1::Main); |
---|
54 | |
---|
55 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.