[SCM] Lisaac compiler branch, master, updated. 47a76212ac7a9035bdbfd7af8b01d61c80e71734

Jeremy Cowgar jeremy at cowgar.com
Wed Jul 29 23:24:05 UTC 2009


The following commit has been merged in the master branch:
commit 7783b0bac1fdfc716f5a547d7cd7ce7cbbfa0b53
Author: Jeremy Cowgar <jeremy at cowgar.com>
Date:   Wed Jul 29 19:22:43 2009 -0400

    * Added a few more ignored files to .gitignore
    * Removed all leading tabs in ABSTRACT_STRING replacing them
      with 8 spaces.

diff --git a/bin/.gitignore b/bin/.gitignore
index 77d8bee..c0fe908 100644
--- a/bin/.gitignore
+++ b/bin/.gitignore
@@ -1,4 +1,7 @@
 lisaac
+lisaac13
 shorter
 lisaac.exe
+lisaac13.exe
 shorter.exe
+path.h
diff --git a/lib2/string/abstract_string.li b/lib2/string/abstract_string.li
index 8287193..8734534 100644
--- a/lib2/string/abstract_string.li
+++ b/lib2/string/abstract_string.li
@@ -147,7 +147,7 @@ Section Public
       result := other.count >= i;
     } else {
       (other.count < i).if {
-	result := FALSE;
+        result := FALSE;
       };
       result := item i < other.item i;
     };
@@ -163,19 +163,19 @@ Section Public
     };
     (count < i).if {
       (other.count < i).if {
-	result := 0;
+        result := 0;
       } else {
-	result := -1;
+        result := -1;
       };
     } else {
       (other.count < i).if {
-	result := 1;
+        result := 1;
       } else {
-	(item i < other.item i).if {
-	  result := -1;
-	} else {
-	  result := 1;
-	};
+        (item i < other.item i).if {
+          result := -1;
+        } else {
+          result := 1;
+        };
       };
     };
     
@@ -192,16 +192,16 @@ Section Public
     i := count;
     (i = other.count).if {
       (storage.fast_memcmp (other.storage) until i).if {
-	result:=TRUE;
+        result:=TRUE;
       } else {
-	i := i - 1;
-	s1 := storage;
-	s2 := other.storage;
-	result:=TRUE;
-	{(i!=0) && {result}}.while_do {
-	  result:=s1.item i.same_as (s2.item i);
-	  i:=i-1;
-	};
+        i := i - 1;
+        s1 := storage;
+        s2 := other.storage;
+        result:=TRUE;
+        {(i!=0) && {result}}.while_do {
+          result:=s1.item i.same_as (s2.item i);
+          i:=i-1;
+        };
       };
     };
     result
@@ -213,9 +213,9 @@ Section Public
     ? {other != NULL};
     (count = other.count).if {
       (count = 0).if {
-	result := TRUE;
+        result := TRUE;
       } else {
-	result:=storage.fast_memcmp (other.storage) until count;
+        result:=storage.fast_memcmp (other.storage) until count;
       };
     };
     result
@@ -322,8 +322,8 @@ Section Public
       i1 := count - s.count + 1;
       i2 := 1;
       { (i1 > count) || { i2 > s.count} || { item i1 != s.item i2}}.until_do {
-	i1 := i1 + 1;
-	i2 := i2 + 1;
+        i1 := i1 + 1;
+        i2 := i2 + 1;
       };
       result := i1 > count;
     };
@@ -342,7 +342,7 @@ Section Public
     ( p.count <= count ).if {
       i := p.count;
       { (i == 0) || { item i != p.item i}}.until_do {
-	i := i - 1;
+        i := i - 1;
       };
       result := i == 0;
     };
@@ -414,49 +414,49 @@ Section Public
     { (state = 4) || {i > count}}.until_do {
       cc := item i;
       ( state = 0).if {
-	cc.is_separator.if {
-	}.elseif {cc = '+'} then {
-	  state := 1;
-	}.elseif {cc = '-'} then {
-	  negative := TRUE;
-	  state := 1;
-	}.elseif {cc.is_digit} then {
-	  value := cc.decimal_value;
-	  state := 2;
-	} else {
-	  state := 4;
-	};
+        cc.is_separator.if {
+        }.elseif {cc = '+'} then {
+          state := 1;
+        }.elseif {cc = '-'} then {
+          negative := TRUE;
+          state := 1;
+        }.elseif {cc.is_digit} then {
+          value := cc.decimal_value;
+          state := 2;
+        } else {
+          state := 4;
+        };
       }.elseif { state = 1} then {
-	cc.is_digit.if {
-	  value := cc.decimal_value;
-	  negative.if {
-	    value := - value;
-	  };
-	  state := 2;
-	} else {
-	  state := 4;
-	};
+        cc.is_digit.if {
+          value := cc.decimal_value;
+          negative.if {
+            value := - value;
+          };
+          state := 2;
+        } else {
+          state := 4;
+        };
       }.elseif { state = 2 } then {
-	cc.is_digit.if {
-	  negative.if {
-	    value := 10 * value - cc.decimal_value;
-	  } else {
-	    value := 10 * value + cc.decimal_value;
-	  };
-	  // over/underflow check here
-	  ((negative && {value > 0}) || { ! negative && {value < 0}}).if {
-	    state := 4;
-	  };
-	}.elseif {cc.is_separator} then {
-	  state := 3;
-	} else {
-	  state := 4;
-	};
+        cc.is_digit.if {
+          negative.if {
+            value := 10 * value - cc.decimal_value;
+          } else {
+            value := 10 * value + cc.decimal_value;
+          };
+          // over/underflow check here
+          ((negative && {value > 0}) || { ! negative && {value < 0}}).if {
+            state := 4;
+          };
+        }.elseif {cc.is_separator} then {
+          state := 3;
+        } else {
+          state := 4;
+        };
       }.elseif { state = 3 } then {
-	cc.is_separator.if {
-	} else {	    
-	  state := 4;
-	};
+        cc.is_separator.if {
+        } else {            
+          state := 4;
+        };
       };
       
       i := i + 1;
@@ -488,36 +488,36 @@ Section Public
       cc := item i;
 
       (state = 0).if {
-	cc.is_separator.if {
-	}.elseif {cc = '+'} then {
-	  state := 1;
-	}.elseif {cc = '-'} then {
-	  negative := TRUE;
-	  state := 1;
-	} else { // cc.is_digit
-	  result := cc.decimal_value;
-	  state := 2;
-	};
+        cc.is_separator.if {
+        }.elseif {cc = '+'} then {
+          state := 1;
+        }.elseif {cc = '-'} then {
+          negative := TRUE;
+          state := 1;
+        } else { // cc.is_digit
+          result := cc.decimal_value;
+          state := 2;
+        };
       }.elseif { state = 1 } then {
-	// cc.is_digit
-	result := cc.decimal_value;
-	negative.if {
-	  result := - result;
-	};
-	state := 2;
+        // cc.is_digit
+        result := cc.decimal_value;
+        negative.if {
+          result := - result;
+        };
+        state := 2;
       }.elseif { state = 2} then {
-	cc.is_digit.if {
-	  negative.if {
-	    result := 10 * result - cc.decimal_value;
-	  } else {
-	    result := 10 * result + cc.decimal_value;
-	  };
-	} else { // cc.is_separator
-	  state := 3;
-	};
+        cc.is_digit.if {
+          negative.if {
+            result := 10 * result - cc.decimal_value;
+          } else {
+            result := 10 * result + cc.decimal_value;
+          };
+        } else { // cc.is_separator
+          state := 3;
+        };
       }.elseif { state = 3 } then {
-	// cc.is_separator
-	i := count; // terminate the loop
+        // cc.is_separator
+        i := count; // terminate the loop
       };
       
       i := i + 1;
@@ -532,7 +532,7 @@ Section Public
     (is_empty).if_false {
       j := lower;
       {(j > upper) || {! item j.is_hexadecimal_digit}}.until_do {
-	j:=j+1;
+        j:=j+1;
       };
       result := j > upper;
     };
@@ -554,7 +554,7 @@ Section Public
     (is_empty).if_false {        
       j := lower;
       {(j > upper) || {! item j.is_octal_digit}}.until_do {
-	j:=j+1;
+        j:=j+1;
       };
       result:= j > upper;
     };
@@ -594,7 +594,7 @@ Section Public
     lower.to upper do { j:INTEGER;
       result := result << 1;
       (item j = '1').if {
-	result := result | 1;
+        result := result | 1;
       };
     };
     result
@@ -718,41 +718,41 @@ Section Public
     {i > count}.until_do {
       cc := item i;
       ( state = 0).if {
-	cc.is_separator.if {
-	}.elseif {cc = '+'} then {
-	  state := 1;
-	}.elseif {cc = '-'} then {
-	  negative := TRUE;
-	  state := 1;
-	}.elseif {cc.is_digit} then {
-	  value_int := cc.decimal_value;
-	  state := 2;
-	};
+        cc.is_separator.if {
+        }.elseif {cc = '+'} then {
+          state := 1;
+        }.elseif {cc = '-'} then {
+          negative := TRUE;
+          state := 1;
+        }.elseif {cc.is_digit} then {
+          value_int := cc.decimal_value;
+          state := 2;
+        };
       }.elseif { state = 1} then {
-	cc.is_digit.if {
-	  value_int := cc.decimal_value;
-	  state := 2;
-	};
+        cc.is_digit.if {
+          value_int := cc.decimal_value;
+          state := 2;
+        };
       }.elseif { state = 2 } then {
-	cc.is_digit.if {
-	  value_int := value_int * 10 + cc.decimal_value;
-	}.elseif { cc = '.' } then {
-	  state := 3;	
-	  value := value_int.to_real_16_16;
-	} else {  // cc is separator
-	  value := value_int.to_real_16_16;
-	  state := 4;
-	};
+        cc.is_digit.if {
+          value_int := value_int * 10 + cc.decimal_value;
+        }.elseif { cc = '.' } then {
+          state := 3;        
+          value := value_int.to_real_16_16;
+        } else {  // cc is separator
+          value := value_int.to_real_16_16;
+          state := 4;
+        };
       }.elseif { state = 3 } then {
-	cc.is_digit.if {
-	  d := d * 10;
-	  value := value + (cc.decimal_value.to_real_16_16) /# d;
-	} else { // cc is separator
-	  state := 4;
-	};
+        cc.is_digit.if {
+          d := d * 10;
+          value := value + (cc.decimal_value.to_real_16_16) /# d;
+        } else { // cc is separator
+          state := 4;
+        };
       }.elseif { state = 4 } then {
-	// cc is separator
-	i := count;  // terminate the loop
+        // cc is separator
+        i := count;  // terminate the loop
       };
       
       i := i + 1;
@@ -882,13 +882,13 @@ Section Public
     {(result != 0) || {(s + other.count - 1) > count }}.until_do {
       i := 1;
       {(i > other.count) || {item (s + i - 1) != other.item i}}.until_do {
-	i := i + 1;
+        i := i + 1;
       };
       
       (i > other.count).if {
-	result := s;
+        result := s;
       } else {
-	s := s + 1;
+        s := s + 1;
       };
     };
     
@@ -947,8 +947,8 @@ Section Public
       split_buffer.clear;
       split_str sep in split_buffer;
       (! split_buffer.is_empty).if {
-	result := ARRAY(STRING).create (split_buffer.lower) to (split_buffer.upper);
-	result.copy split_buffer;
+        result := ARRAY(STRING).create (split_buffer.lower) to (split_buffer.upper);
+        result.copy split_buffer;
       };
     };
     
@@ -986,8 +986,8 @@ Section Public
       split_buffer.clear;
       split_in split_buffer;
       (! split_buffer.is_empty).if {
-	result := ARRAY(STRING).create (split_buffer.lower) to (split_buffer.upper);
-	result.copy split_buffer;
+        result := ARRAY(STRING).create (split_buffer.lower) to (split_buffer.upper);
+        result.copy split_buffer;
       };
     };
     ? { (result != NULL) ->> { ! result.is_empty }};
@@ -1007,24 +1007,24 @@ Section Public
     old_count := words.count;
     (count > 0).if {
       1.to upper do { i:INTEGER;
-	c := item i;
-	(state = 0).if {
-	  (! c.is_separator).if {
-	    string_buffer.clear;
-	    string_buffer.append_character c;
-	    state := 1;
-	  };
-	} else {
-	  (! c.is_separator).if {
-	    string_buffer.append_character c;
-	  } else {
-	    words.add_last (string_buffer.twin);	    
-	    state := 0;
-	  };
-	};
+        c := item i;
+        (state = 0).if {
+          (! c.is_separator).if {
+            string_buffer.clear;
+            string_buffer.append_character c;
+            state := 1;
+          };
+        } else {
+          (! c.is_separator).if {
+            string_buffer.append_character c;
+          } else {
+            words.add_last (string_buffer.twin);            
+            state := 0;
+          };
+        };
       };
       ( state == 1).if {
-	words.add_last (string_buffer.twin);
+        words.add_last (string_buffer.twin);
       };
     };
     
@@ -1039,8 +1039,8 @@ Section Public
       split_buffer.clear;
       split_at sep in split_buffer;
       (! split_buffer.is_empty).if {
-	result := ARRAY(STRING).create (split_buffer.lower) to (split_buffer.upper);
-	result.copy split_buffer;
+        result := ARRAY(STRING).create (split_buffer.lower) to (split_buffer.upper);
+        result.copy split_buffer;
       };
     };
        
@@ -1062,24 +1062,24 @@ Section Public
     old_count := words.count;
     (count > 0).if {
       1.to upper do { i:INTEGER;
-	c := item i;
-	(state = 0).if {
-	  (c != sep).if {
-	    string_buffer.clear;
-	    string_buffer.append_character c;
-	    state := 1;
-	  };
-	} else {
-	  (c != sep).if {
-	    string_buffer.append_character c;
-	  } else {
-	    words.add_last (string_buffer.twin);	    
-	    state := 0;
-	  };
-	};
+        c := item i;
+        (state = 0).if {
+          (c != sep).if {
+            string_buffer.clear;
+            string_buffer.append_character c;
+            state := 1;
+          };
+        } else {
+          (c != sep).if {
+            string_buffer.append_character c;
+          } else {
+            words.add_last (string_buffer.twin);            
+            state := 0;
+          };
+        };
       };
       ( state == 1).if {
-	words.add_last (string_buffer.twin);
+        words.add_last (string_buffer.twin);
       };
     };
     
diff --git a/src/.gitignore b/src/.gitignore
new file mode 100644
index 0000000..aa32382
--- /dev/null
+++ b/src/.gitignore
@@ -0,0 +1,3 @@
+lisaac.c
+lisaac
+lisaac.exe

-- 
Lisaac compiler



More information about the Lisaac-commits mailing list