[SCM] applications.git branch, master, updated. d4bcc9385c480276a5d265a3093a0e8795894dc2

Benoit Sonntag sonntag at icps.u-strasbg.fr
Sun Jan 10 02:31:03 UTC 2010


The following commit has been merged in the master branch:
commit 617b7163834d618b358cc78e2f86ab76fcb85327
Author: Benoit Sonntag <sonntag at icps.u-strasbg.fr>
Date:   Sun Jan 10 02:46:07 2010 +0100

    add test for mpg2 decoder

diff --git a/examples/standard/test_compiler/test1.li b/examples/standard/reflexivity/example.li
similarity index 70%
copy from examples/standard/test_compiler/test1.li
copy to examples/standard/reflexivity/example.li
index 5ad04a5..827e7fb 100644
--- a/examples/standard/test_compiler/test1.li
+++ b/examples/standard/reflexivity/example.li
@@ -19,10 +19,10 @@
 //                     http://isaacproject.u-strasbg.fr/                     //
 ///////////////////////////////////////////////////////////////////////////////
 Section Header
-  
-  + name      := TEST1;
 
-  - copyright := "2003-2008 Sonntag Benoit";
+  + name      := EXAMPLE;
+
+  - copyright := "2003-2010 Sonntag Benoit";
 
   - author    := "Sonntag Benoit (sonntag at icps.u-strasbg.fr)";
   - comment   := "The main prototype";
@@ -32,19 +32,44 @@ Section Inherit
   - parent_object:OBJECT := OBJECT;
 
 Section Public
-  
-  - method (a,b,c:INTEGER) :(INTEGER,INTEGER,BOOLEAN) <-
+
+  - ess b:E <-
   (
-    a,a-b,a=c
+    { a:E;
+      a.print;
+    }.value "Hello\n";
   );
-  
+
   - main <-
-  ( + r1,r2:INTEGER;
-    + r3:BOOLEAN;
+  ( 
+/*   
+    { a:E;
+      a.print;
+    }.value "Hello\n";
+  */  
     
-    (r1,r2,r3) := method (1,2,3);
-    `/* @r1, @r2, at r3*/`;    
-    (r1,r2,r3) := method (2,3,4);
-    `/* @r1, @r2, at r3*/`;        
-  );
++ a:MAP_EXAMPLE;
+    + old_sec:STRING_CONSTANT;
 
+    a := MAP_EXAMPLE.create ("VALUE",5,'c');
+    "Section Header\n\
+    \  + name := ".print;
+    a.type_name.print;
+    ";\n".print;
+    a.foreach_intern_data { (sec,nam:STRING_CONSTANT,typ:ABSTRACT_STRING,val:ABSTRACT_STRING);
+      (old_sec != sec).if {
+        old_sec := sec;
+        "Section ".print;
+        sec.print;
+        '\n'.print;
+      };
+      "  + ".print;
+      nam.print;
+      ':'.print;
+      typ.type_name.print;
+      " := ".print;
+      val.print;
+      ";\n".print;
+    };
+    
+  );
diff --git a/examples/standard/demomaker/glass/xy.li b/examples/standard/reflexivity/map_example.li
similarity index 78%
copy from examples/standard/demomaker/glass/xy.li
copy to examples/standard/reflexivity/map_example.li
index 3165e18..2af7858 100644
--- a/examples/standard/demomaker/glass/xy.li
+++ b/examples/standard/reflexivity/map_example.li
@@ -1,5 +1,5 @@
 ///////////////////////////////////////////////////////////////////////////////
-//                             Lisaac Example                                //
+//                             Lisaac Compiler                               //
 //                                                                           //
 //                   LSIIT - ULP - CNRS - INRIA - FRANCE                     //
 //                                                                           //
@@ -19,10 +19,10 @@
 //                     http://isaacproject.u-strasbg.fr/                     //
 ///////////////////////////////////////////////////////////////////////////////
 Section Header
-  
-  + name      := XY;
 
-  - copyright := "2003-2008 Sonntag Benoit";
+  + name      := MAP_EXAMPLE;
+
+  - copyright := "2003-2010 Sonntag Benoit";
 
   - author    := "Sonntag Benoit (sonntag at icps.u-strasbg.fr)";
   - comment   := "The main prototype";
@@ -32,24 +32,29 @@ Section Inherit
   - parent_object:OBJECT := OBJECT;
 
 Section Public
-  
-  + x:INTEGER;
-  + y:INTEGER;
-  
+
   //
   // Creation.
   //
 
-  - create (px,py:INTEGER) :SELF <-
+  - create (txt:ABSTRACT_STRING,int:INTEGER,char:CHARACTER) :SELF <-
   ( + result:SELF;
     result := clone;
-    result.make (px,py);
+    result.make (txt,int,char);
     result
   );
 
-  - make (px,py:INTEGER) <-
-  ( 
-    x := px;
-    y := py;
+  - make (txt:ABSTRACT_STRING,int:INTEGER,char:CHARACTER) <-
+  (
+    (text, integer, character) := (txt, txt,txt); //int, char);
   );
 
+
+Section Mapping
+
+  + text:ABSTRACT_STRING;
+
+  + integer:ABSTRACT_STRING; //INTEGER;
+
+  + character:ABSTRACT_STRING; //CHARACTER;
+

-- 
applications.git



More information about the Lisaac-commits mailing list