[SCM] Lisaac compiler branch, mildred-projects, updated. lisaac-0.12-503-g64b7bec
Mildred Ki'Lya
silkensedai at online.fr
Mon Aug 24 20:14:11 UTC 2009
The following commit has been merged in the mildred-projects branch:
commit 1faa73eb7cb6e46d716ffc92117f4d8f92b61c59
Author: Mildred Ki'Lya <silkensedai at online.fr>
Date: Mon Aug 24 18:53:26 2009 +0200
Fixed errors so the compiler compiles
diff --git a/lib/io/output_stream.li b/lib/io/output_stream.li
index 5d732d2..573ea06 100644
--- a/lib/io/output_stream.li
+++ b/lib/io/output_stream.li
@@ -112,6 +112,7 @@ Section Public
DIRECTORY.has path
);
+ /*
- append_file file_name:STRING <-
(
+ c:CHARACTER;
@@ -127,6 +128,7 @@ Section Public
};
tmp_file_read.disconnect;
);
+ */
- flush <-
// forces a write of unwritten character (write my have been
@@ -140,7 +142,7 @@ Section Private
- basic_io_putc c:CHARACTER <- SYSTEM_IO.print_char c;
- basic_error_putc c:CHARACTER <- SYSTEM_IO.print_error_char c;
-
+ /*
- tmp_file_read:TEXT_FILE_READ := TEXT_FILE_READ.create;
-
+ */
- tmp_string:STRING := STRING.create 512;
diff --git a/lib/number/low_level/float_map.li b/lib/number/low_level/float_map.li
index f7c4132..c9b7b0b 100644
--- a/lib/number/low_level/float_map.li
+++ b/lib/number/low_level/float_map.li
@@ -24,7 +24,7 @@ Section Header
- comment := "Mapping for REAL_xx.";
-Section PRIVATE
+Section Private
- deferred <- crash_with_message "Slot deferred.";
diff --git a/lib/string/abstract_string.li b/lib/string/abstract_string.li
index 38ae68d..e538e1e 100644
--- a/lib/string/abstract_string.li
+++ b/lib/string/abstract_string.li
@@ -1244,10 +1244,10 @@ Section Public
? { (words.count) >= old_count };
);
- - get_new_iterator:ITERATOR(CHARACTER) <-
+ /*- get_new_iterator:ITERATOR(CHARACTER) <-
(
ITERATOR_ON_STRING(CHARACTER).create Self
- );
+ );*/
- same_string other:ABSTRACT_STRING :BOOLEAN <-
// Do self and other have the same character sequence?
diff --git a/lib_os/unix/system/system.li b/lib_os/unix/system/system.li
index a1283f2..474d2bb 100644
--- a/lib_os/unix/system/system.li
+++ b/lib_os/unix/system/system.li
@@ -117,7 +117,7 @@ Section SYSTEM,MEMORY
result
);
*/
-Section ISAAC
+Section Public //ISAAC
- make <-
// Isaac compatibility.
diff --git a/make.lip b/make.lip
index 853d8d8..bb32b29 100644
--- a/make.lip
+++ b/make.lip
@@ -57,51 +57,14 @@ Section Private
+ target:STRING := "unix";
- + lib_std :PROJECT;
- + parent_project :PROJECT;
-
- //
- // Code
- //
-
- - default_init prj:PROJECT <-
- // Initialize the library
- (
- "Initialize project ".print; Self.print;
- prj.if { " from ".print; prj.print; };
- "\n".print;
-
- parent_project := prj;
- parent_project.if {
- lisaac := parent_project.lisaac;
- target := parent_project.target;
- debug_level := parent_project.debug_level;
- debug_with_code := parent_project.debug_with_code;
- is_all_warning := parent_project.is_all_warning;
- is_optimization := parent_project.is_optimization;
- inline_level := parent_project.inline_level;
- is_java := parent_project.is_java;
- is_cop := parent_project.is_cop;
- is_statistic := parent_project.is_statistic;
- is_quiet := parent_project.is_quiet;
- };
- );
-
- - init prj:PROJECT <-
- // Initialize the library
- (
- default_init prj;
- );
-
//
// Directory.
//
- standard_path <-
// Standard library.
- (
- lib_std := lib_std.create("STD");
- lib_std := lib_std.load("lib.lip");
+ (
+ path (lisaac + "lib/*");
);
//
@@ -110,18 +73,31 @@ Section Private
- unix_target <-
(
+ path (lisaac + "lib_os/unix/system/");
+ path (lisaac + "lib_os/unix/file_system/");
+ path (lisaac + "lib_os/unix/video/");
);
- windows_target <-
(
+ path (lisaac + "lib_os/unix/system/");
+ path (lisaac + "lib_os/windows/file_system/");
+ path (lisaac + "lib_os/unix/file_system/"); // BSBS: ??
+ path (lisaac + "lib_os/windows/video/");
);
- dos_target <-
(
+ path (lisaac + "lib_os/unix/system/");
+ path (lisaac + "lib_os/unix/file_system/"); // BSBS: ??
+ path (lisaac + "lib_os/dos/file_system/");
+ path (lisaac + "lib_os/dos/video/");
);
- java_target <-
(
+ path (lisaac + "lib_os/java/system/");
+ path (lisaac + "lib_os/java/file_system/");
);
- get_target <-
@@ -140,7 +116,7 @@ Section Private
};
(target = "").if {
"Target code needed.\n".print;
- exit 1;
+ exit;
};
);
@@ -218,12 +194,6 @@ Section Private
(
general_back_end;
);
-
- - print_info <-
- // Print information about the project
- (
- info_project.print;
- );
Section Public
@@ -309,15 +279,7 @@ Section Public
//
// Other.
//
-
- - info <-
- // Information about the project
- (
- front_end;
- print_info;
- exit;
- );
-
+
- q <-
// Quiet operation.
(
diff --git a/src/lip/lip_project.li b/src/lip/lip_project.li
index 47dec54..9dcf99b 100644
--- a/src/lip/lip_project.li
+++ b/src/lip/lip_project.li
@@ -68,14 +68,14 @@ Section Public
semantic_error (position,"Invalid argument.");
};
} else {
- string_tmp.append "Code slot `";
+ string_tmp.copy "Code slot `";
string_tmp.append (ALIAS_STR.slot_init);
- string_tmp.append "' not found";
- string_tmp.append "in project `";
+ string_tmp.append "' not found in project `";
string_tmp.append (name);
string_tmp.append "'";
string_tmp.append ".";
- warning_error (position, string_tmp);
+ POSITION.put_error warning text string_tmp;
+ POSITION.send_error;
};
);
@@ -408,33 +408,40 @@ Section Public
similarity := s;
itm_found := item;
}.elseif {(itm_found != NULL) && {similarity == s}} then {
- // Ambiguity: raise an error
- string_tmp.copy "Ambiguous prototype `";
- string_tmp.append search;
- string_tmp.append "' in project `";
- string_tmp.append name;
- string_tmp.append "'.\n\tBetween: `";
- string_tmp.append (itm_found.protopath);
- string_tmp.append "' in project `";
- string_tmp.append (itm_found.source_project.name);
- string_tmp.append "'\n\tAnd: `";
- string_tmp.append (item.protopath);
- string_tmp.append "' in project `";
- string_tmp.append (item.source_project.name);
- string_tmp.append "'";
- (other != NULL).if {
- string_tmp.append "\n\tFrom: `";
- string_tmp.append (other.protopath);
- string_tmp.append "' (";
- string_tmp.append (s.to_string);
- string_tmp.append " similar members)";
- };
- string_tmp.append "\n";
- POSITION.put_error semantic text string_tmp;
- (pos != POSITION).if {
- pos.put_position;
- };
- POSITION.send_error;
+ // Ambiguity: pass if the filepath is the same
+ (itm_found.filepath = item.filepath).if_false {
+ // Ambiguity: raise an error
+ string_tmp4.copy "Ambiguous prototype `";
+ string_tmp4.append search;
+ string_tmp4.append "' in project `";
+ string_tmp4.append name;
+ string_tmp4.append "'.\n\tBetween: `";
+ string_tmp4.append (itm_found.protopath);
+ string_tmp4.append "'\n\t `";
+ string_tmp4.append (itm_found.filepath);
+ string_tmp4.append "' in project `";
+ string_tmp4.append (itm_found.source_project.name);
+ string_tmp4.append "'\n\tAnd: `";
+ string_tmp4.append (item.protopath);
+ string_tmp4.append "'\n\t `";
+ string_tmp4.append (item.filepath);
+ string_tmp4.append "' in project `";
+ string_tmp4.append (item.source_project.name);
+ string_tmp4.append "'";
+ (other != NULL).if {
+ string_tmp4.append "\n\tFrom: `";
+ string_tmp4.append (other.protopath);
+ string_tmp4.append "' (";
+ string_tmp4.append (s.to_string);
+ string_tmp4.append " similar members)";
+ };
+ string_tmp4.append "\n";
+ POSITION.put_error semantic text string_tmp4;
+ (pos != POSITION).if {
+ pos.put_position;
+ };
+ POSITION.send_error;
+ };
};
};
};
@@ -781,7 +788,12 @@ Section Public
string_tmp.copy "Incorrect directory `";
string_tmp.append joined_path;
string_tmp.append "'.";
- warning_error (position,string_tmp);
+ (position != POSITION).if {
+ warning_error (position,string_tmp);
+ } else {
+ POSITION.put_error warning text string_tmp;
+ POSITION.send_error;
+ };
};
);
diff --git a/src/lip/prj_item.li b/src/lip/prj_item.li
index 65dfa2e..ac708e5 100644
--- a/src/lip/prj_item.li
+++ b/src/lip/prj_item.li
@@ -54,14 +54,15 @@ Section Public
+ projectprotopath :STRING_CONSTANT <- externprotopath;
- externprotopath :STRING_CONSTANT <-
- (
- string_tmp2.clear;
+ ( + buffer:STRING;
+ buffer := STRING.create 32;
+ buffer.clear;
(project.protoname != NULL).if {
- string_tmp2.append (project.protoname);
- string_tmp2.add_last '.';
+ buffer.append (project.protoname);
+ buffer.add_last '.';
};
- string_tmp2.append protopath;
- ALIAS_STR.get string_tmp2
+ buffer.append protopath;
+ ALIAS_STR.get buffer
);
- protopath:STRING_CONSTANT <- (deferred; NULL);
diff --git a/src/parser.li b/src/parser.li
index feeccdc..87fb29a 100644
--- a/src/parser.li
+++ b/src/parser.li
@@ -769,7 +769,7 @@ Section Private
};
string_tmp.remove_last 1; // remove '\\'
string_tmp.add_last (last_integer.to_character);
- string_tmp.println; last_integer.to_character.code.print; " ".print; last_integer.print; "\n".print;
+ //string_tmp.println; last_integer.to_character.code.print; " ".print; last_integer.print; "\n".print;
// Save 3 octal digits
//string_tmp.add_last ((val / 64).decimal_digit);
//string_tmp.add_last (((val % 64) / 8).decimal_digit);
--
Lisaac compiler
More information about the Lisaac-commits
mailing list