source: to-imperative/trunk/samples/Syntax/static1.cc @ 682

Last change on this file since 682 was 682, checked in by orlov, 18 years ago
  • Test for the correctness of constant static expressions initializing.
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.5 KB
Line 
1#include <rf_core.hh>
2
3namespace refal
4{
5
6using namespace rfrt;
7
8namespace static1
9{
10
11RF_DECL (Main);
12
13}
14
15namespace static1
16{
17
18static const Expr _c_16 = Word::create_expr ("X") + Word::create_expr ("A") + Word::create_expr ("B") + Word::create_expr ("C") + Word::create_expr ("D");
19
20static const Expr _c_17 = Expr (_c_16, 2, 2);
21
22static const Expr _c_0 = Word::create_expr ("A") + (_c_17) () + Word::create_expr ("D");
23
24static const Expr _c_18 = Expr (_c_16, 3, 2);
25
26static const Expr _c_5 = Word::create_expr ("A") + Word::create_expr ("B") + (_c_18) () + Word::create_expr ("E") + Word::create_expr ("F");
27
28static const Expr _c_1 = Expr (_c_5, 0, 2);
29
30static const Expr _c_19 = Expr (_c_16, 0, 3);
31
32static const Expr _c_8 = (_c_1) () + (_c_19) () + (_c_16) () + (_c_17) () + (_c_18) ();
33
34static const Expr _c_2 = Expr (_c_8, 0, 1);
35
36static const Expr _c_3 = (_c_2) ();
37
38static const Expr _c_4 = Word::create_expr ("D") + (_c_17) () + Word::create_expr ("A");
39
40static const Expr _c_7 = Word::create_expr ("A") + Word::create_expr ("X") + (_c_18) () + Word::create_expr ("Y") + Word::create_expr ("B") + (Word::create_expr ("Z") + Word::create_expr ("Z")) ();
41
42static const Expr _c_6 = Word::create_expr ("M") + (Expr (_c_7, 1, 3)) () + Word::create_expr ("N");
43
44static const Expr _c_9 = Expr (_c_8, 1, 2);
45
46static const Expr _c_13 = ShortInt::create_expr (1) + ShortInt::create_expr (2) + ShortInt::create_expr (3) + ShortInt::create_expr (4);
47
48static const Expr _c_10 = Expr (_c_13, 0, 2);
49
50static const Expr _c_11 = Expr (_c_13, 2, 2);
51
52static const Expr _c_12 = Expr (_c_13, 1, 2);
53
54static const Expr _c_14 = Expr (_c_13, 0, 3);
55
56static const Expr _c_15 = Expr (_c_13, 1, 3);
57
58RF_FUNC (Main, (), (RF_RES _v_res1))
59  Expr _ve__e__e_tmp_m_static1rf_m_3_m_17 (_c_0);
60  Expr _ve__e__e_tmp_m_static1rf_m_4_m_11 (_c_1);
61  Expr _ve__e__e_tmp_m_static1rf_m_5_m_13 (_c_2);
62  Expr _ve__e__e_tmp_m_static1rf_m_6_m_15 (_c_3);
63  Expr _ve__e__e_tmp_m_static1rf_m_7_m_17 (_c_4);
64  Expr _ve__e__e_tmp_m_static1rf_m_8_m_21 (_c_5);
65  Expr _ve__e__e_tmp_m_static1rf_m_9_m_23 (_c_6);
66  Expr _ve__e__e_tmp_m_static1rf_m_10_m_27 (_c_7);
67  Expr _ve__e__e_tmp_m_static1rf_m_11_m_45 (_c_8);
68  Expr _ve__e__e_tmp_m_static1rf_m_12_m_27 (_c_9);
69  Expr _ve__e__e_tmp_m_static1rf_m_13_m_11 (_c_10);
70  Expr _ve__e__e_tmp_m_static1rf_m_14_m_11 (_c_11);
71  Expr _ve__e__e_tmp_m_static1rf_m_15_m_11 (_c_12);
72  Expr _ve__e__e_tmp_m_static1rf_m_16_m_15 (_c_13);
73  Expr _ve__e__e_tmp_m_static1rf_m_17_m_13 (_c_14);
74  Expr _ve__e__e_tmp_m_static1rf_m_18_m_13 (_c_15);
75  _v_res1 = empty;
76RF_END
77
78}
79
80rfrt::Entry rf_entry (static1::Main);
81
82}
Note: See TracBrowser for help on using the repository browser.