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

Réorganisation du code pour Translation()

parent bc5b533f
......@@ -87,52 +87,47 @@ System_file;
];
[ Translation n i w w1 r;
! @tokenise buffer parse; ! FIXME utile pour phrase incomplète?
!r = 0;
n = NbMotPhrase();
for (i=1: i<=n: i++) {
w = DicMot(i);
if (w == 0) { ! WARNING si >= 9 ou 6
r = DecolleApostrophe(i);
if (r) {
n++;
Tokenise__(buffer, parse);
}
continue;
}
if (w == 'au' or 'aux') {
parse-->(i*2-1) = 'a//';
parse->(i*4) = 1;
continue;
}
if (w == 'd^' or 'du') {
parse-->(i*2-1) = 'de';
continue;
}
#IfDef DE_A_JOUER;
if (w == 'de') {
r = PosMot(i) + 1;
if (i == n) {
parse-->(i*2-1) = 'dj';
buffer->r = 'j';
}
else {
w = DicMot(i+1);
if ((w->#dict_par1) & 8) {
w = DicMot(i);
switch(w) {
0:
r = DecolleApostrophe(i);
if (r) {
n++;
Tokenise__(buffer, parse);
}
'au', 'aux':
parse-->(i*2-1) = 'a//';
parse->(i*4) = 1;
'du', 'd^':
parse-->(i*2-1) = 'de';
#IfDef DE_A_JOUER;
'de':
r = PosMot(i) + 1;
if (i == n) {
parse-->(i*2-1) = 'dj';
buffer->r = 'j';
}
}
}
#EndIf;
else {
w = DicMot(i+1);
if ((w->#dict_par1) & 8) {
parse-->(i*2-1) = 'dj';
buffer->r = 'j';
}
}
#EndIf;
}
}
if (n == 1) return;
! Pronoms avant le verbe !TODO faire les modifications dans parser
!Pronoms avant le verbe TODO optimiser
w = parse-->1;
w1 = parse-->3;
!TODO optimiser
r = 2;
switch (w) { !y en
'se', 's^': w = 'se'; r = 1; !s'y asseoir/balancer/suspendre
......
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