summaryrefslogtreecommitdiff
path: root/lib/assembler.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/assembler.c')
-rw-r--r--lib/assembler.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/assembler.c b/lib/assembler.c
index b472ce1..25b975b 100644
--- a/lib/assembler.c
+++ b/lib/assembler.c
@@ -1127,7 +1127,7 @@ static void super_pattern(pattern_t * patterns, expression_t * e)
return;
if (!((e->op == OP_DECAL) || (e->op == OP_DIRECT)))
return;
-
+
for (patterns = patterns->next; patterns; patterns = patterns->next) {
for (i = 0; i < patterns->nbr; i++) {
if (!patterns->expr[i]->name) {
@@ -1136,11 +1136,13 @@ static void super_pattern(pattern_t * patterns, expression_t * e)
if (!patterns->expr[i]->left) {
e->pattern = patterns;
e->index = i;
+ return;
}
} else {
if (patterns->expr[i]->left) {
e->pattern = patterns;
e->index = i;
+ return;
}
}
}
@@ -1153,11 +1155,13 @@ static void super_pattern(pattern_t * patterns, expression_t * e)
&& (e->child->next->e_subtype == E_VALUE))) {
e->pattern = patterns;
e->index = i;
+ return;
}
} else {
if (e->e_subtype == E_LABEL) {
e->pattern = patterns;
e->index = i;
+ return;
}
}
}
@@ -1321,7 +1325,7 @@ static void evaluate_pattern(_TableauVariable * it, expression_t * e)
if (m->string) {
fprintf(stderr, "et une string associée\n");
if (m->type) {
- if (!strcmp(m->name, "I")) {
+ if (strcmp(m->name, "I")) {
exception(1, _("Unknow constant type in the meta language"));
}
if (e->e_subtype == E_VALUE) {
@@ -1678,9 +1682,15 @@ void asm_eol(void)
for (i = 0; i < instr->nbimplicit; i++) {
switch(instr->itypes[i]) {
case 0: /* type direct */
+ fprintf(stderr, "On cherche la variable %s\n", instr->istrings[i]);
t = (expression_t *) NomVarToVar(instr->istrings[i], it, &trouve);
if (!trouve) {
- exception(1, _("Syntax error in meta language"));
+ t = (expression_t *) Emalloc(sizeof(expression_t));
+ t->e_type = t->e_subtype = E_VALUE;
+ t->avalue = 0;
+ t->child = t->next = NULL;
+ t->pattern = NULL;
+ fprintf(stderr, "Insertion de la variable %s, de valeur %i.\n", instr->istrings[i], t->avalue);
}
InsererVarDansTab(&it, CreerElement(instr->implicits[i], t));
break;