1 ///////////////////////////////////////////////////////////////////////////////
4 // LSIIT - ULP - CNRS - INRIA - FRANCE //
6 // This program is free software: you can redistribute it and/or modify //
7 // it under the terms of the GNU General Public License as published by //
8 // the Free Software Foundation, either version 3 of the License, or //
9 // (at your option) any later version. //
11 // This program is distributed in the hope that it will be useful, //
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of //
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
14 // GNU General Public License for more details. //
16 // You should have received a copy of the GNU General Public License //
17 // along with this program. If not, see <http://www.gnu.org/licenses/>. //
19 // http://isaacproject.u-strasbg.fr/ //
20 ///////////////////////////////////////////////////////////////////////////////
25 - copyright := "2003-2007 Benoit Sonntag";
28 - author := "Sonntag Benoit (bsonntag@loria.fr)";
29 - comment := "Unary Expression.";
33 + parent_expr:Expanded EXPR;
37 - is_invariant:BOOLEAN <- right.is_invariant;
47 - static_type:TYPE_FULL <- right.static_type;
49 - get_type t:TYPES_TMP <-
51 t.add (static_type.raw);
58 - create p:POSITION with r:EXPR :SELF <-
66 - make p:POSITION with r:EXPR <-
72 - my_copy:SELF <- SELF.create position with (right.my_copy);
78 - '==' Right 60 other:EXPR :BOOLEAN <-
82 (same != NULL) && {right == same.right}
94 - execute_unlink:INSTR <-
99 - execute_link:EXPR <-
101 + old_seq:UINTEGER_32;
102 + right_cst:INTEGER_CST;
104 old_seq := seq_call_and_loop;
105 right := right.execute_link;
108 // Conservator transformation.
109 result := exec_conservator;
110 ((result = NULL) && {right_cst != NULL}).if {
111 result := exec_right right_cst;
113 ((result = NULL) && {old_seq = seq_call_and_loop}).if {
114 // No conservator transformation.
120 result.set_position position;
127 - exec_conservator:EXPR <- NULL;
129 - exec_right right_cst:INTEGER_CST :EXPR <- NULL;
137 - genere buffer:STRING <-
140 static_type.genere_declaration buffer;
144 buffer.add_last symbol;
154 - display buffer:STRING <-
157 buffer.add_last symbol;
159 right.display buffer;