Commit 42860477 authored by auraes's avatar auraes 💬
Browse files

Optimisation de Translation() v3

parent 7ea5d2c7
......@@ -96,7 +96,7 @@ Verb 'montrer'
#IfDef OPTIONAL_EXTENDED_VERBSET;
Verb 'reveiller'
* 'soi' -> Wake
* 'se' -> Wake
* creature -> WakeOther
;
......@@ -187,11 +187,11 @@ Verb 'sauter'
;
Verb 'asseoir' 'coucher' 'allonger'
* 'soi' 'sur'/'dans' noun -> Enter
* 'se' 'sur'/'dans' noun -> Enter
;
Verb 'lever'
* 'soi' -> Exit
* 'se' -> Exit
;
#IfDef OPTIONAL_EXTENDED_VERBSET;
......@@ -200,7 +200,7 @@ Verb 'nager' 'conduire'
;
Verb 'balancer' 'suspendre'
* 'soi' 'a'/'au'/'aux'/'sur'/'dans' noun -> Swing
* 'se' 'a'/'au'/'aux'/'sur'/'dans' noun -> Swing
;
#Endif;
......@@ -425,7 +425,7 @@ Verb 'merde'
;
Verb 'excuser'
* 'soi' -> Sorry
* 'se' -> Sorry
;
Verb 'zut'
......
......@@ -96,7 +96,7 @@ Verb 'montrer'
#IfDef OPTIONAL_EXTENDED_VERBSET;
Verb 'réveiller'
* 'soi' -> Wake
* 'se' -> Wake
* creature -> WakeOther
;
......@@ -187,11 +187,11 @@ Verb 'sauter'
;
Verb 'asseoir' 'coucher' 'allonger'
* 'soi' 'sur'/'dans' noun -> Enter
* 'se' 'sur'/'dans' noun -> Enter
;
Verb 'lever'
* 'soi' -> Exit
* 'se' -> Exit
;
#IfDef OPTIONAL_EXTENDED_VERBSET;
......@@ -200,7 +200,7 @@ Verb 'nager' 'conduire'
;
Verb 'balancer' 'suspendre'
* 'soi' 'à'/'au'/'aux'/'sur'/'dans' noun -> Swing
* 'se' 'à'/'au'/'aux'/'sur'/'dans' noun -> Swing
;
#Endif;
......@@ -425,7 +425,7 @@ Verb 'merde'
;
Verb 'excuser'
* 'soi' -> Sorry
* 'se' -> Sorry
;
Verb 'zut'
......
......@@ -473,14 +473,14 @@ System_file;
}
!FRENCH
! check for pronouns
if(p_parse_pointer --> 0 == '-le' or '-la' or '-l^' or '-les' or '-lui' or 'eux') { !TODO elle(s) lui ?
if(p_parse_pointer --> 0 == '-le' or '-la' or '-l^' or '-les' or 'lui' or 'leur') { !TODO elle(s) lui ?
switch(p_parse_pointer --> 0) {
'-le': _noun = le_obj;
'-la': _noun = la_obj;
'-l^': _noun = l_obj;
'-les': _noun = les_obj;
'-lui': _noun = lui_obj;
'eux': _noun = leur_obj;
'lui': _noun = lui_obj;
'leur': _noun = leur_obj;
}
!FRENCH
if(_noun == 0) {
......
......@@ -1187,7 +1187,7 @@ Include "parser.h";
!FRENCH
Object selfobj "vous"
with
name 'soi' 'se', ! 'soi' 'soi-même' 'moi' !TODO FIXME
name 'se',
short_name "vous-même",
description "Ça a l'air bien !",
before NULL,
......
......@@ -21,13 +21,12 @@ System_file;
[ LanguagePronom w;
switch (w) {
'-l^': print "l'"; !TODO
'-l^': print "l'";
'-le': print "le";
'-la': print "la";
'-les': print "les";
'-lui': print "lui";
'eux': print "leur";
default: rfalse;
'lui': print "lui";
'leur': print "leur";
}
];
......
......@@ -13,13 +13,12 @@ System_file;
[ LanguagePronom w;
switch (w) {
'-l^': print "l'"; !TODO
'-l^': print "l'";
'-le': print "le";
'-la': print "la";
'-les': print "les";
'-lui': print "lui";
'eux': print "leur";
default: rfalse;
'lui': print "lui";
'leur': print "leur";
}
];
......@@ -74,7 +73,7 @@ System_file;
else return 0;
w2 = DictWord(at+2, lgm-2);
if (w2) {
if (w2) { !TODO optimiser
InsertWordParse(motn+1, w2);
parse-->(motn*2-1) = w1;
v = parse->(motn*4);
......@@ -121,49 +120,21 @@ System_file;
}
if (n == 1) return;
!Pronoms avant le verbe !TODO optimiser
!Pronoms avant le verbe
w1 = parse-->1;
w1 = parse-->1;
w2 = parse-->3;
r = 2;
r = 1;
switch (w1) { !y en
'se': r = 1;
'l^': w1 = '-l^'; r = 1;
'le':
w1 = '-le';
switch (w2) {
'lui': w2 = '-lui';
'leur': w2 = 'eux';
default: r = 1;
}
'la':
w1 = '-la';
switch (w2) {
'lui': w2 = '-lui';
'leur': w2 = 'eux';
default: r = 1;
}
'les':
w1 = '-les';
switch (w2) {
'lui': w2 = '-lui';
'leur': w2 = 'eux';
default: r = 1;
}
'lui': w1 = '-lui'; r = 1;
'leur': w1 = 'eux'; r = 1;
'se', 'lui', 'leur': ;
'l^': w1 = '-l^';
'le': w1 = '-le';
'la': w1 = '-la';
'les': w1 = '-les';
default: r = 0;
}
if (r) {
if (r == 1) {
parse-->1 = parse-->3;
r = parse-->2;
parse-->2 = parse-->4;
parse-->4 = r;
parse-->3 = w1;
}
else {
if (w2 == 'lui' or 'leur') {
parse-->1 = parse-->5;
r = parse-->2;
parse-->2 = parse-->6;
......@@ -171,6 +142,13 @@ System_file;
parse-->6 = r;
parse-->3 = w2;
}
else {
parse-->1 = parse-->3;
r = parse-->2;
parse-->2 = parse-->4;
parse-->4 = r;
parse-->3 = w1;
}
}
];
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment