[SCM] Lisaac compiler branch, master, updated. lisaac-0.12-627-gd87beee
ontologiae
ontologiae at gmail.com
Fri May 28 11:14:35 UTC 2010
The following commit has been merged in the master branch:
commit da0c7fcb5aeab8f4fbc4dcd862a6f20857208e35
Author: ontologiae <ontologiae at gmail.com>
Date: Fri May 28 11:05:34 2010 +0200
Comments on compiler
diff --git a/src/aliaser_local.li b/src/aliaser_local.li
index ab86f40..fd824c2 100644
--- a/src/aliaser_local.li
+++ b/src/aliaser_local.li
@@ -25,7 +25,7 @@ Section Header
- copyright := "2003-2009 Sonntag Benoit";
- author := "Sonntag Benoit (sonntag at icps.u-strasbg.fr)";
- - comment := "The main prototype";
+ - comment := "Aliaser local";
Section Inherit
diff --git a/src/type/prototype.li b/src/type/prototype.li
index da0c7f2..98ad4c1 100644
--- a/src/type/prototype.li
+++ b/src/type/prototype.li
@@ -66,6 +66,7 @@ Section Public
+ last_slot:ITM_SLOT;
- add_slot s:ITM_SLOT <-
+ // add slot `s' to slot list, updating `first_slot' and `last_slot' if needeed
(
slot_list.fast_put s to (s.name);
(first_slot = NULL).if {
@@ -77,6 +78,7 @@ Section Public
);
- search_parent n:STRING_CONSTANT :BOOLEAN <-
+ // return TRUE if `n' is a parent
( + slot:ITM_SLOT;
+ result:BOOLEAN;
@@ -185,6 +187,7 @@ Section Public
+ idf_generic_list:FAST_ARRAY(ITM_TYPE_PARAMETER);
- append_filename buffer:STRING <-
+ // ?
(
(path_begin != 1).if {
buffer.append "...";
@@ -210,6 +213,7 @@ Section Public
//
- create f:STRING_CONSTANT name n:STRING_CONSTANT generic_count c:INTEGER :SELF <-
+ // create prototype named `n' with `c' generic prototype
( + result:SELF;
result := clone;
result.make f name n generic_count c;
@@ -217,6 +221,7 @@ Section Public
);
- make f:STRING_CONSTANT name n:STRING_CONSTANT generic_count c:INTEGER <-
+ // create prototype named `n' with `c' generic prototype
[
-? {! prototype_dico.fast_has f};
-? {n != NULL};
@@ -273,6 +278,7 @@ Section Public
//
- depend <-
+ // Compute a step of depend
( + slot_main:SLOT;
+ self_main:EXPR;
+ base:NODE;
@@ -445,6 +451,7 @@ Section Public
);
- shorter_out buf:STRING <-
+ // Generating documentation (shorter)
( + title:STRING_CONSTANT;
+ s:ITM_SLOT;
put name to buf like (ALIAS_STR.short_title);
@@ -505,6 +512,7 @@ Section Public
Section PROTOTYPE
- get_slot_main:SLOT <-
+ // Verify if slot main exists and return it
( + result:SLOT;
+ s:ITM_SLOT;
@@ -528,6 +536,10 @@ Section PROTOTYPE
result
);
+
+ //
+ // Shorter
+ //
- shorter_get_all_slot_in lst:FAST_ARRAY(ITM_SLOT) <-
( + s:ITM_SLOT;
+ ps:ITM_TYPE_SIMPLE;
@@ -820,6 +832,7 @@ Section PROTOTYPE
Section Private
- protopath_from_path filename:ABSTRACT_STRING :STRING_CONSTANT <-
+ // return lisaac format prototype path from filename path `filename'
( + strip_end :INTEGER;
is_lip.if {
// *.lip
@@ -851,6 +864,7 @@ Section Private
);
- name_last n:INTEGER :STRING_CONSTANT <-
+ // get the last name prototype
[
-? { n > 0 };
]
@@ -886,6 +900,7 @@ Section Private
- insert_prototype <- insert_prototype_start 1;
- insert_prototype_start start:INTEGER <-
+ // Find canonical name
( + i:INTEGER;
+ proto:PROTOTYPE;
diff --git a/src/type/type.li b/src/type/type.li
index 94cfd42..11e5c32 100644
--- a/src/type/type.li
+++ b/src/type/type.li
@@ -1034,7 +1034,7 @@ Section TYPE
+ is_only:BOOLEAN;
- //call_path.print; ' '.print; n.print; '\n'.print;
+ "Load Prototype : ".print;call_path.print; ' '.print; n.print; '\n'.print;
result := dico_name_to_prototype.fast_reference_at n;
(result = NULL).if {
@@ -1162,7 +1162,7 @@ Section TYPE
POSITION.send_error;
};
- //result.filename.print; '\n'.print; '\n'.print;
+ result.filename.print; '\n'.print; '\n'.print;
result
);
@@ -1322,7 +1322,7 @@ Section Private
+ result:BOOLEAN;
idx := type_c.first_substring_index t;
(idx != 0).if {
- ((idx=1) || {!type_c.item (idx - 1).is_letter_or_digit} || {!type_c.item (idx - 1) != '_').if {
+ ((idx=1) || {!type_c.item (idx - 1).is_letter_or_digit} || {!type_c.item (idx - 1) != '_'}).if {
idx2 := idx + type_c.count;
result := (
(idx2>type_c.upper) || {!type_c.item idx2.is_letter_or_digit} || {!type_c.item idx2 != '_'}
@@ -1330,4 +1330,4 @@ Section Private
};
};
result
- );
\ No newline at end of file
+ );
--
Lisaac compiler
More information about the Lisaac-commits
mailing list