[SCM] Lisaac compiler branch, master, updated. a8a952bad4bc5b15d30471184525e24afa9bfa89

Benoit Sonntag sonntag at icps.u-strasbg.fr
Fri Jul 31 02:04:19 UTC 2009


The following commit has been merged in the master branch:
commit a8a952bad4bc5b15d30471184525e24afa9bfa89
Author: Benoit Sonntag <sonntag at icps.u-strasbg.fr>
Date:   Fri Jul 31 04:04:17 2009 +0200

    compiler with shorter ok

diff --git a/make.lip b/make.lip
index 8657dc4..82c61e3 100644
--- a/make.lip
+++ b/make.lip
@@ -203,9 +203,9 @@ Section Public
   
   //
   // Debug information.
-  //
+  // 
     
-  - no_debug <-
+  - no_debug <-  
   // No debug information.
   (
     debug_level := 0;
diff --git a/src/lip/lip_slot_code.li b/src/lip/lip_slot_code.li
index 9a20e20..5beacd5 100644
--- a/src/lip/lip_slot_code.li
+++ b/src/lip/lip_slot_code.li
@@ -43,11 +43,20 @@ Section Public
   
   + comment:STRING_CONSTANT;
   
+  // + comment_chapter:STRING_CONSTANT;
+  
   - set_comment c:STRING_CONSTANT <-
   (
     comment := c;
   );
   
+  /*
+  - set_comment_chapter c:STRING_CONSTANT <-
+  (
+    comment_chapter := c;
+  );
+  */
+  
   //
   // Creation.
   //
@@ -124,8 +133,14 @@ Section Public
       ">".print;
     };
     " :\n".print;
-    (comment != NULL).if {
-      comment.print;
+    (comment != NULL).if {      
+      '\t'.print;
+      (comment.lower).to (comment.upper) do { i:INTEGER;
+        comment.item i.print;
+        ((comment.item i = '\n') && {i < comment.upper}).if {
+          '\t'.print;
+        };
+      };
     } else {
       "\t Sorry, no comment (see `make.lip').\n".print;
     };
diff --git a/src/parser.li b/src/parser.li
index a421e70..4c99289 100644
--- a/src/parser.li
+++ b/src/parser.li
@@ -248,8 +248,8 @@ Section Private
           };
           (is_shorter2).if {
             (stat)
-            .when 3 then { string_tmp3.add_last '\n'; }
-            .when 4 then { string_tmp4.add_last '\n'; };
+            .when 0 or 1 then { string_tmp3.add_last '\n'; }
+            .when 2      then { string_tmp4.add_last '\n'; };
           };
           position := position + 1;
 	};
@@ -2702,10 +2702,12 @@ Section Private
       // 
       (read_symbol (ALIAS_STR.symbol_affect_code)).if_false {
         warning_error (current_position,"Added '<-' is needed.");
-      };      
+      };            
+      is_shorter2 := TRUE;
       (read_character '(').if_false {
         warning_error (current_position,"Added '(' is needed.");
       };      
+      is_shorter2 := FALSE;
       cod := ALIAS_ARRAY[LIP_CODE].new;
       {(instr := readlip_expr) != NULL}.while_do {
         cod.add_last instr;
@@ -2720,7 +2722,7 @@ Section Private
       slot_code := LIP_SLOT_CODE.create pos section sec 
       name n argument data code cod;
       (sec = ALIAS_STR.section_public).if {
-        (last_comment_slot.is_empty).if {
+        (last_comment_slot = NULL).if {
           warning_error (pos,"Comment needed.");
         } else {
           slot_code.set_comment (ALIAS_STR.get last_comment_slot);

-- 
Lisaac compiler



More information about the Lisaac-commits mailing list