[SCM] Lisaac compiler branch, mildred-projects, updated. lisaac-0.12-421-g00631ef
Mildred Ki'Lya
silkensedai at online.fr
Wed Aug 5 21:05:56 UTC 2009
The following commit has been merged in the mildred-projects branch:
commit 00631ef72fe89aaf98ac2c0142ca131117859c9d
Author: Mildred Ki'Lya <silkensedai at online.fr>
Date: Wed Aug 5 22:31:50 2009 +0200
fix project initialization
diff --git a/TODO b/TODO
index 9807644..3f0db71 100644
--- a/TODO
+++ b/TODO
@@ -7,5 +7,7 @@
* script that check for svn commit each 10hours and launch a benchmark
game on several architecture and generate a html page on the website.
+[Mildred]
-
+ * fix lip grammar so we can chain calls like:
+ prj := PROJECT.create("STD").load("prj.lip");
diff --git a/make.lip b/make.lip
index ad4e966..75d7145 100644
--- a/make.lip
+++ b/make.lip
@@ -78,13 +78,8 @@ Section Private
- standard_path <-
// Standard library.
(
- "STD A: ".print; lib_std.print; "\n".print;
lib_std := lib_std.create("STD");
- "STD B: ".print; lib_std.print; "\n".print;
- lib_std := lib_std.private;
- "STD C: ".print; lib_std.print; "\n".print;
lib_std := lib_std.load("lib.lip");
- "STD D: ".print; lib_std.print; "\n".print;
);
//
diff --git a/src/lip/lip_project.li b/src/lip/lip_project.li
index 5949ea4..0d459ed 100644
--- a/src/lip/lip_project.li
+++ b/src/lip/lip_project.li
@@ -114,7 +114,7 @@ Section Public
- set_protoname n:STRING_CONSTANT <-
(
string_tmp.clear;
- (n.lower).to (n.count - 3) do { i:INTEGER;
+ (n.lower).to (n.count) do { i:INTEGER;
+ c:CHARACTER;
c := n.item i.to_upper;
c.is_upper.if {
diff --git a/src/lip/lip_valueproject.li b/src/lip/lip_valueproject.li
index becedbe..488c62d 100644
--- a/src/lip/lip_valueproject.li
+++ b/src/lip/lip_valueproject.li
@@ -38,19 +38,19 @@ Section Private
- set_value p:LIP_PROJECT <-
(
value := p;
- prj_name := NULL;
- prj_pub := FALSE;
- (p != NULL).if {
- prj_pub := p.is_public;
- prj_name := p.protoname;
- };
+// prj_name := NULL;
+// prj_pub := FALSE;
+// (p != NULL).if {
+// prj_pub := p.is_public;
+// prj_name := p.protoname;
+// };
);
- make other:LIP_VALUEPROJECT :SELF <-
(
value := other.value;
- prj_name := other.prj_name;
- prj_pub := other.prj_pub;
+// prj_name := other.prj_name;
+// prj_pub := other.prj_pub;
Self
);
@@ -115,6 +115,7 @@ Section Public
- append_status_in str:STRING <-
(
+ /*
str.append "[";
(prj_name != NULL).if {
str.append "name:";
@@ -127,6 +128,7 @@ Section Public
str.append "private";
};
str.append "]";
+ */
);
- to_boolean :BOOLEAN <- value != NULL;
@@ -173,15 +175,19 @@ Section Public
// PROJECT.public
//
}.elseif {(name = ALIAS_STR.slot_public) && {val = NULL}} then {
- prj_pub := TRUE;
- (value != NULL).if { value.set_public TRUE; };
+ //prj_pub := TRUE;
+ //(value != NULL).if { value.set_public TRUE; };
+ (value = NULL).if { value := LIP_PROJECT.create};
+ value.set_public TRUE;
//
// PROJECT.private
//
}.elseif {(name = ALIAS_STR.slot_private) && {val = NULL}} then {
- prj_pub := FALSE;
- (value != NULL).if { value.set_public FALSE; };
+ //prj_pub := FALSE;
+ //(value != NULL).if { value.set_public FALSE; };
+ (value = NULL).if { value := LIP_PROJECT.create};
+ value.set_public FALSE;
//
// PROJECT.create "NAME"
@@ -191,7 +197,9 @@ Section Public
(str = NULL).if {
semantic_error (position,"String argument needed.");
};
- prj_name := str.value;
+ //prj_name := str.value;
+ (value = NULL).if { value := LIP_PROJECT.create};
+ value.set_protoname (str.value);
//
// PROJECT.load "file.lip"
@@ -210,9 +218,9 @@ Section Public
};
string_tmp.append (str.value);
lip_path := (ALIAS_STR.get string_tmp);
- value := LIP_PROJECT.create.init lip_path from origin;
- value.set_public prj_pub;
- (prj_name != NULL).if { value.set_protoname prj_name; };
+ value.init lip_path from origin;
+ //value.set_public prj_pub;
+ //(prj_name != NULL).if { value.set_protoname prj_name; };
origin.list_prj.add_last value;
} else {
--
Lisaac compiler
More information about the Lisaac-commits
mailing list