[SCM] Lisaac compiler branch, mildred-projects, updated. lisaac-0.12-428-geeebcb2
Mildred Ki'Lya
silkensedai at online.fr
Fri Aug 7 00:11:32 UTC 2009
The following commit has been merged in the mildred-projects branch:
commit 2786a0f976ebe826aa4ec06d34dbca62bcf5f0e6
Author: Mildred Ki'Lya <silkensedai at online.fr>
Date: Thu Aug 6 21:11:11 2009 +0200
fix bugs
diff --git a/src/lip/lip_project.li b/src/lip/lip_project.li
index d8449c0..4532a32 100644
--- a/src/lip/lip_project.li
+++ b/src/lip/lip_project.li
@@ -345,7 +345,7 @@ Section Public
string_tmp.copy search;
string_tmp.append " is not found in project `";
string_tmp.append name;
- string_tmp.append "'";
+ string_tmp.append "'\n";
// string_tmp.append "\n";
// (items.lower).to (items.upper) do { i:INTEGER;
// item := items.item i;
@@ -386,14 +386,14 @@ Section Public
(items.lower).to (items.upper) do { i:INTEGER;
+ item :PRJ_ITEM;
item := items.item i;
- (!same_project || {item.project = Self}).if {
+ (!same_project || {item.source_project = Self}).if {
item.match suffix prefix prefix.if {
// the item is a candidate
+ s :INTEGER;
// If it is from the same project, stop searching from other projects
- (item.project = Self).if {
+ (item.source_project = Self).if {
same_project := TRUE;
- ((itm_found != NULL) && {itm_found.project != Self}).if {
+ ((itm_found != NULL) && {itm_found.source_project != Self}).if {
similarity := -1;
itm_found := NULL;
}
@@ -412,10 +412,16 @@ Section Public
// Ambiguity: raise an error
string_tmp.copy "Ambiguous prototype `";
string_tmp.append search;
- string_tmp.append "'.\n\tBetween: `";
+ 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: `";
@@ -424,6 +430,7 @@ Section Public
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;
diff --git a/src/lip/prj_item.li b/src/lip/prj_item.li
index f3b5220..08e4151 100644
--- a/src/lip/prj_item.li
+++ b/src/lip/prj_item.li
@@ -38,15 +38,15 @@ Section PRJ_ITEM
- set_prototype p:PROTOTYPE <- deferred [ +? { prototype = p }; ];
- - dico_proto :HASHED_DICTIONARY[PROTOTYPE,STRING_CONSTANT] :=
- HASHED_DICTIONARY[PROTOTYPE,STRING_CONSTANT].create;
-
- self_item_prototype :PRJ_ITM_PROTOTYPE <- (deferred; NULL);
Section Public
+ project :LIP_PROJECT;
+ - source_project :LIP_PROJECT <- project;
+ - foreign :BOOLEAN <- (project != source_project);
+
+ is_public :BOOLEAN := TRUE;
- is_private:BOOLEAN <- !is_public;
- set_public pub:BOOLEAN <- is_public := pub;
@@ -55,13 +55,13 @@ Section Public
- externprotopath :STRING_CONSTANT <-
(
- string_tmp.clear;
+ string_tmp2.clear;
(project.protoname != NULL).if {
- string_tmp.append (project.protoname);
- string_tmp.add_last '.';
+ string_tmp2.append (project.protoname);
+ string_tmp2.add_last '.';
};
- string_tmp.append protopath;
- ALIAS_STR.get string_tmp
+ string_tmp2.append protopath;
+ ALIAS_STR.get string_tmp2
);
- protopath:STRING_CONSTANT <- (deferred; NULL);
@@ -92,7 +92,7 @@ Section Public
(prototype = NULL).if {
path := filepath;
- set_prototype (dico_proto.fast_reference_at path);
+ set_prototype (PROTOTYPE.prototype_dico.fast_reference_at path);
(prototype != NULL).if {
prototype.itm_source.add_last self_item_prototype;
};
@@ -108,7 +108,6 @@ Section Public
source Self
generic_count gen_count;
set_prototype p;
- dico_proto.fast_put p to path;
PARSER.go_on p;
} else {
string_tmp.copy "Cannot open `";
diff --git a/src/lip/prj_itm_alias.li b/src/lip/prj_itm_alias.li
index 78184a4..ec06f14 100644
--- a/src/lip/prj_itm_alias.li
+++ b/src/lip/prj_itm_alias.li
@@ -44,6 +44,8 @@ Section Public
+ source_item :PRJ_ITEM;
+ - source_project :LIP_PROJECT <- source_item.project;
+
- filepath :STRING_CONSTANT <- source_item.filepath;
+ protopath:STRING_CONSTANT <- source_item.externprotopath;
diff --git a/src/parser.li b/src/parser.li
index 625c362..5735af8 100644
--- a/src/parser.li
+++ b/src/parser.li
@@ -3288,10 +3288,13 @@ Section Public
entry := FS_MIN.open_read path_lip;
(entry != NULL).if {
FS_MIN.close entry;
- object := PROTOTYPE.create path_lip
- name path_lip
- source NULL
- generic_count 0;
+ object := PROTOTYPE.prototype_dico.fast_reference_at path_lip;
+ (object = NULL).if {
+ object := PROTOTYPE.create path_lip
+ name path_lip
+ source NULL
+ generic_count 0;
+ };
lip_prj := p;
source := object.source;
--
Lisaac compiler
More information about the Lisaac-commits
mailing list