summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/assembler.c295
-rw-r--r--po/ProjetArchi.pot188
-rw-r--r--po/cat-id-tbl.c123
-rw-r--r--src/compilo.c2
4 files changed, 473 insertions, 135 deletions
diff --git a/lib/assembler.c b/lib/assembler.c
index dec26e8..bc9d5d2 100644
--- a/lib/assembler.c
+++ b/lib/assembler.c
@@ -36,7 +36,7 @@ typedef struct bytestream_t {
struct bytestream_t *next;
- int line;
+ int line, relog;
char *filename;
} bytestream_t;
@@ -128,9 +128,11 @@ static bytestream_t *pushuninit(int size)
s->next = NULL;
s->Encoded = 0;
s->segment = segment;
- s->size = size;
+ s->size = 1;
s->Label = NULL;
s->Expr = NULL;
+
+ s->relog = 1;
s->line = line;
s->filename = filenames[nestedinc - 1];
@@ -169,6 +171,8 @@ static bytestream_t *pushdword(unsigned long int d, expression_t * e)
exception(1, _("You have to be into the .text or the .data segment to define a value."));
}
+ fprintf(stderr, "On pousse %i avec %p\n", d, e);
+
s = pushuninit(1);
s->Encoded = d;
if (e) {
@@ -185,6 +189,7 @@ static bytestream_t *pushlabel(char *label)
s = pushuninit(0);
s->Label = Estrdup(label);
+ s->size = 0;
NomVarToVar(label, labels, &trouve);
@@ -1121,6 +1126,7 @@ int assembler_init(void)
text->next = data->next = bss->next = NULL;
text->size = data->size = bss->size = 0;
+ text->Label = data->Label = bss->Label = NULL;
return 0;
}
@@ -1263,11 +1269,6 @@ static instruct_t *e_match_i(phon_t * phons, instruct_t * instructs, expression_
}
break;
- case 'o':
- /* Pour que quelque chose soit absolu, il nous suffit d'avoir un label dans l'expression */
- if (!islabel(t))
- go_out = 1;
- break;
case 'O':
/* C'est le cas le plus simple ou presque, il suffit de tout prendre */
break;
@@ -1342,6 +1343,7 @@ static void evaluate_pattern(_TableauVariable * it, expression_t * e)
if (strcmp(m->name, "I")) {
exception(1, _("Unknow constant type in the meta language"));
}
+ fprintf(stderr, "On pousse une valeur (1)\n");
if (e->e_subtype == E_VALUE) {
pushdword(e->avalue, NULL);
} else {
@@ -1361,7 +1363,6 @@ static void evaluate_pattern(_TableauVariable * it, expression_t * e)
t->symbol = NULL;
t->pattern = NULL;
InsererVarDansTab(it, CreerElement(m->name, t));
- free(t);
}
}
}
@@ -1382,6 +1383,7 @@ static void evaluate_pattern(_TableauVariable * it, expression_t * e)
&& (e->child->next->child->e_subtype == E_VALUE)) {
tv = e->child->next->child->avalue;
}
+ fprintf(stderr, "On pousse une valeur (2)\n");
pushdword(tv, e->child);
} else {
exception(1, _("Logical error in meta language"));
@@ -1408,7 +1410,6 @@ static void evaluate_pattern(_TableauVariable * it, expression_t * e)
}
t->symbol = NULL;
InsererVarDansTab(it, CreerElement(m->name, t));
- free(t);
} else {
exception(1, _("Logical error in meta language"));
}
@@ -1432,7 +1433,6 @@ static void evaluate_pattern(_TableauVariable * it, expression_t * e)
t->symbol = NULL;
t->pattern = NULL;
InsererVarDansTab(it, CreerElement(m->name, t));
- free(t);
}
}
}
@@ -1546,6 +1546,7 @@ void asm_eol(void)
break;
switch (e_current->e_subtype) {
case E_VALUE:
+ fprintf(stderr, "On pousse une valeur (3)\n");
pushdword(e_current->avalue, NULL);
break;
case E_STRING:
@@ -1556,6 +1557,7 @@ void asm_eol(void)
break;
case E_LABEL:
case E_OPERATION:
+ fprintf(stderr, "On pousse une valeur (4)\n");
pushdword(0, e_current);
break;
default:
@@ -1613,13 +1615,13 @@ void asm_eol(void)
expression, on va tenter de l'évaluer */
Initialise(&it);
- pi = pushdword(0, NULL);
for (i = 0; i < instr->nbexplicit; i++) {
if (instr->strings[i]) {
switch (instr->strings[i][0]) {
case 'C':
if (instr->etypes) {
if (!strcmp(instr->names[i], "I")) {
+ fprintf(stderr, "On pousse une valeur (6)\n");
if (e_current->e_subtype == E_VALUE) {
pushdword(e_current->avalue, 0);
} else {
@@ -1636,6 +1638,7 @@ void asm_eol(void)
case 'O':
if (instr->etypes) {
if (!strcmp(instr->names[i], "I")) {
+ fprintf(stderr, "On pousse une valeur (7)\n");
if (e_current->e_subtype == E_VALUE) {
pushdword(e_current->avalue, 0);
} else {
@@ -1647,23 +1650,6 @@ void asm_eol(void)
("Unknow constant type in the meta language"));}
}
break;
- case 'o':
- if (instr->etypes) {
- if (!strcmp(instr->names[i], "I")) {
- if (e_current->e_subtype == E_VALUE) {
- exception(1,
- _
- ("Can't have a direct value for a relative offset"));}
- else {
- pi = pushdword(0, e_current);
- }
- pi->Encoded -= pi->offset;
- } else {
- exception(1,
- _
- ("Unknow constant type in the meta language"));}
- }
- break;
case 'P':
t = (expression_t *) Emalloc(sizeof(expression_t));
t->e_type = t->e_subtype = E_VALUE;
@@ -1730,6 +1716,7 @@ void asm_eol(void)
fprintf(stderr, "Variables\n");
AfficheTableau(it);
+ fprintf(stderr, "On pousse une valeur (8)\n");
pushdword(evaluate_field(it, "FI", fields), NULL);
DetruitTab(&it);
break;
@@ -1746,15 +1733,267 @@ void asm_eol(void)
e_current = e_line = NULL;
}
+/*
+typedef struct bytestream_t {
+ unsigned long int Encoded;
+ int offset, segment, size;
+ char *Label;
+ expression_t *Expr;
+
+ struct bytestream_t *next;
+
+ int line;
+ char *filename;
+} bytestream_t;
+
+bytestream_t *text, *data, *bss, *p_text, *p_data, *p_bss;
+int s_text = 0, s_data = 0, s_bss = 0;
+*/
+
+static void writeword(unsigned long int a, FILE * f, int n) {
+ int i;
+
+ fprintf(stderr, "On écrit le mot %i\n", a);
+ if (fwrite(&a, sizeof(unsigned long int), 1, f) != 1) {
+ if (ferror(f)) {
+ pushcontext(strerror(errno));
+ }
+ exception(1, _("Error writing file"));
+ }
+
+ for (i = 0; i < n - 1; i++) {
+ writeword(0, f, 1);
+ }
+}
+
+static void writestring(char * string, FILE * f) {
+ fprintf(stderr, "On écrit la chaîne %s\n", string);
+ for (; *string; string++) {
+ writeword(*string, f, 1);
+ }
+}
+
+/*
+ /\
+ / \
+ / ++ \
+ / ++ \
+ / \
+ |~~~~~~~~~~|
+ | +-+ +-+ |
+ | +-+ +-+ |
+ | |
+ | +--+ |
+ | | .| |
+ +---+--+---+
+
+*/
+
void asm_eof(FILE * f)
{
+ bytestream_t * t, * u;
+ FILE * f1, * f2;
+ int nbsymbols = 0, a;
+ char errctx[BUFSIZ], trouve;
+ bytestream_t * ttext = text, * tdata = data, * tbss = bss;
+
+ fprintf(stderr, "On a reçu une fin de fichier...\n");
+
+ pushcontext(_("Creating temporary files"));
+ if (!(f1 = fopen("__text__", "wb"))) {
+ pushcontext(strerror(errno));
+ exception(1, _("Error writing file __text__"));
+ }
+ if (!(f2 = fopen("__symbols__", "wb"))) {
+ pushcontext(strerror(errno));
+ exception(1, _("Error writing file __symbols__"));
+ }
+ popcontext();
+
+ pushcontext(_("Dumping memory into object file"));
+
+ pushcontext(_("Dumping text segment"));
+ for (ttext = ttext->next; ttext; ttext = ttext->next) {
+ sprintf(errctx, _("Processing word number %i coming from line %i of the file %s."), ttext->offset, ttext->line, ttext->filename);
+ fprintf(stderr, "%s\n", errctx);
+ pushcontext(errctx);
+
+ a = 0;
+
+ if (ttext->Expr) {
+ fprintf(stderr, "On a une sous-expression..\n");
+ switch(ttext->Expr->e_subtype) {
+ case E_VALUE:
+ fprintf(stderr, "Type valeur.\n");
+ a = ttext->Expr->avalue;
+ break;
+ case E_LABEL:
+ fprintf(stderr, "Type label.\n");
+ a = ttext->Expr->avalue;
+ nbsymbols++;
+ writeword(0, f2, 1);
+ writeword(ttext->offset, f2, 1);
+ writeword(strlen(ttext->Expr->symbol), f2, 1);
+ writestring(ttext->Expr->symbol, f2);
+ break;
+ case E_OPERATION:
+ fprintf(stderr, "Type operation.\n");
+ if (ttext->Expr->op != OP_FUNC_CALL) {
+ exception(1, _("Can't evaluate expression for a direct value"));
+ }
+ if (strcmp(ttext->Expr->symbol, "diff")) {
+ exception(1, _("Can't evaluate expression for a direct value"));
+ }
+ if ((ttext->Expr->child->e_subtype != E_LABEL) || (ttext->Expr->child->next->e_subtype != E_LABEL)) {
+ exception(1, _("Can only use the diff() function onto labels"));
+ }
+
+ t = (bytestream_t *) NomVarToVar(ttext->Expr->child->symbol, labels, &trouve);
+ if (!trouve) {
+ exception(1, _("Can only evaluate a diff on local symbols"));
+ }
+ u = (bytestream_t *) NomVarToVar(ttext->Expr->child->next->symbol, labels, &trouve);
+ if (!trouve) {
+ exception(1, _("Can only evaluate a diff on local symbols"));
+ }
+
+ if (t->segment != u->segment) {
+ exception(1, _("Can only evaluate a diff on symbols from the same segment"));
+ }
+
+ a = t->offset - u->offset;
+ break;
+ default:
+ exception(1, _("Can't evaluate expression"));
+
+ }
+ }
+
+ a += ttext->Encoded;
+
+ if (ttext->size) {
+ writeword(a, f1, text->size);
+ } else {
+ if (ttext->Label) {
+ nbsymbols++;
+ writeword(0, f2, 1);
+ writeword(ttext->offset, f2, 1);
+ writeword(strlen(ttext->Expr->symbol), f2, 1);
+ writestring(ttext->Expr->symbol, f2);
+ }
+ }
+ popcontext();
+ }
+ popcontext();
+
+ pushcontext(_("Dumping data segment"));
+ for (tdata = tdata->next; tdata; tdata = tdata->next) {
+ sprintf(errctx, _("Processing word number %i coming from line %i of the file %s."), tdata->offset, tdata->line, tdata->filename);
+ fprintf(stderr, "%s\n", errctx);
+ pushcontext(errctx);
+
+ a = 0;
+
+ if (tdata->Expr) {
+ fprintf(stderr, "On a une sous-expression..\n");
+ switch(tdata->Expr->e_subtype) {
+ case E_VALUE:
+ fprintf(stderr, "Type valeur.\n");
+ a = tdata->Expr->avalue;
+ break;
+ case E_LABEL:
+ fprintf(stderr, "Type label.\n");
+ a = tdata->Expr->avalue;
+ nbsymbols++;
+ writeword(0, f2, 1);
+ writeword(tdata->offset, f2, 1);
+ writeword(strlen(tdata->Expr->symbol), f2, 1);
+ writestring(tdata->Expr->symbol, f2);
+ break;
+ case E_OPERATION:
+ fprintf(stderr, "Type operation.\n");
+ if (tdata->Expr->op != OP_FUNC_CALL) {
+ exception(1, _("Can't evaluate expression for a direct value"));
+ }
+ if (strcmp(tdata->Expr->symbol, "diff")) {
+ exception(1, _("Can't evaluate expression for a direct value"));
+ }
+ if ((tdata->Expr->child->e_subtype != E_LABEL) || (tdata->Expr->child->next->e_subtype != E_LABEL)) {
+ exception(1, _("Can only use the diff() function onto labels"));
+ }
+
+ t = (bytestream_t *) NomVarToVar(tdata->Expr->child->symbol, labels, &trouve);
+ if (!trouve) {
+ exception(1, _("Can only evaluate a diff on local symbols"));
+ }
+ u = (bytestream_t *) NomVarToVar(tdata->Expr->child->next->symbol, labels, &trouve);
+ if (!trouve) {
+ exception(1, _("Can only evaluate a diff on local symbols"));
+ }
+
+ if (t->segment != u->segment) {
+ exception(1, _("Can only evaluate a diff on symbols from the same segment"));
+ }
+
+ a = t->offset - u->offset;
+ break;
+ default:
+ exception(1, _("Can't evaluate expression"));
+
+ }
+ }
+
+ a += tdata->Encoded;
+
+ if (tdata->size) {
+ writeword(a, f1, text->size);
+ } else {
+ if (tdata->Label) {
+ nbsymbols++;
+ writeword(0, f2, 1);
+ writeword(tdata->offset, f2, 1);
+ writeword(strlen(tdata->Expr->symbol), f2, 1);
+ writestring(tdata->Expr->symbol, f2);
+ }
+ }
+ popcontext();
+ }
+ popcontext();
+
+ fclose(f1);
+
+ pushcontext(_("Dumping bss segment"));
+ for (tbss = tbss->next; tbss; tbss = tbss->next) {
+ sprintf(errctx, _("Processing word number %i coming from line %i of the file %s."), tbss->offset, tbss->line, tbss->filename);
+ fprintf(stderr, "%s\n", errctx);
+ pushcontext(errctx);
+
+ if (!tbss->size) {
+ if (tbss->Label) {
+ nbsymbols++;
+ writeword(0, f2, 1);
+ writeword(tbss->offset, f2, 1);
+ writeword(strlen(tbss->Expr->symbol), f2, 1);
+ writestring(tbss->Expr->symbol, f2);
+ }
+ }
+ popcontext();
+ }
+ popcontext();
+
+
+ popcontext();
+ fclose(f1);
+ fclose(f2);
}
static void delete_bytestream(bytestream_t * s)
{
if (s->next)
delete_bytestream(s->next);
+ if (s->Label)
+ free(s->Label);
free(s);
}
diff --git a/po/ProjetArchi.pot b/po/ProjetArchi.pot
index 57a114f..a4a4cba 100644
--- a/po/ProjetArchi.pot
+++ b/po/ProjetArchi.pot
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2001-04-16 02:57+0200\n"
+"POT-Creation-Date: 2001-04-16 03:17+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -14,135 +14,135 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: ENCODING\n"
-#: lib/assembler.c:169
+#: lib/assembler.c:171
msgid "You have to be into the .text or the .data segment to define a value."
msgstr ""
-#: lib/assembler.c:192
+#: lib/assembler.c:197
msgid "Label already defined"
msgstr ""
-#: lib/assembler.c:255
+#: lib/assembler.c:260
msgid "You can't have the startpoint elsewhere than the .text segment"
msgstr ""
-#: lib/assembler.c:399
+#: lib/assembler.c:404
msgid "Not a valid . directive"
msgstr ""
-#: lib/assembler.c:428
+#: lib/assembler.c:433
msgid "Not a valid # directive"
msgstr ""
#. Cas des directives .
-#: lib/assembler.c:436
+#: lib/assembler.c:441
msgid "Error: extra parameters to a . directive."
msgstr ""
-#: lib/assembler.c:552
+#: lib/assembler.c:557
msgid "Too much arguments to #undef"
msgstr ""
-#: lib/assembler.c:556
+#: lib/assembler.c:561
msgid "Defined symbol not found."
msgstr ""
-#: lib/assembler.c:562
+#: lib/assembler.c:567
msgid "Too much arguments to #include"
msgstr ""
-#: lib/assembler.c:564
+#: lib/assembler.c:569
#, c-format
msgid "Including file at line %i"
msgstr ""
-#: lib/assembler.c:567
+#: lib/assembler.c:572
msgid "Error reading include file"
msgstr ""
-#: lib/assembler.c:619 lib/assembler.c:625
+#: lib/assembler.c:624 lib/assembler.c:630
msgid "Zero divide."
msgstr ""
-#: lib/assembler.c:638 lib/assembler.c:645
+#: lib/assembler.c:643 lib/assembler.c:650
msgid "Error: unable to compute the immediate value"
msgstr ""
-#: lib/assembler.c:654
+#: lib/assembler.c:659
msgid "Function unknow"
msgstr ""
-#: lib/assembler.c:661
+#: lib/assembler.c:666
msgid "Addresses addition not allowed"
msgstr ""
-#: lib/assembler.c:665
+#: lib/assembler.c:670
msgid "You can only use the decal operator on labels"
msgstr ""
-#: lib/assembler.c:670 lib/assembler.c:673 lib/assembler.c:704
+#: lib/assembler.c:675 lib/assembler.c:678 lib/assembler.c:709
msgid "Address operation invalid"
msgstr ""
-#: lib/assembler.c:676 lib/assembler.c:708
+#: lib/assembler.c:681 lib/assembler.c:713
msgid "Addresses operations not allowed"
msgstr ""
-#: lib/assembler.c:679 lib/assembler.c:801 lib/assembler.c:838
-#: lib/assembler.c:912
+#: lib/assembler.c:684 lib/assembler.c:806 lib/assembler.c:843
+#: lib/assembler.c:917
msgid "Expression too complex or invalid"
msgstr ""
-#: lib/assembler.c:712 lib/assembler.c:725 lib/assembler.c:778
-#: lib/assembler.c:790 lib/assembler.c:827
+#: lib/assembler.c:717 lib/assembler.c:730 lib/assembler.c:783
+#: lib/assembler.c:795 lib/assembler.c:832
msgid "Address type not supported"
msgstr ""
-#: lib/assembler.c:794
+#: lib/assembler.c:799
msgid "Address addition not supported"
msgstr ""
-#: lib/assembler.c:831 lib/assembler.c:883
+#: lib/assembler.c:836 lib/assembler.c:888
msgid "Expression invalid"
msgstr ""
#. Bon si l'on est ici, c'est pas bon signe non plus...
-#: lib/assembler.c:956
+#: lib/assembler.c:961
msgid "Expression too complex"
msgstr ""
-#: lib/assembler.c:1020
+#: lib/assembler.c:1025
msgid "Something wrong, nested operator called..."
msgstr ""
-#: lib/assembler.c:1091
+#: lib/assembler.c:1096
msgid "Something wrong, lparenthesis operator called..."
msgstr ""
-#: lib/assembler.c:1094
+#: lib/assembler.c:1099
msgid "Something wrong, should never got here..."
msgstr ""
-#: lib/assembler.c:1275
+#: lib/assembler.c:1276
msgid "Unknow predefined string into the meta language"
msgstr ""
-#: lib/assembler.c:1332
+#: lib/assembler.c:1333
msgid "Pattern not matching..."
msgstr ""
-#: lib/assembler.c:1343 lib/assembler.c:1375 lib/assembler.c:1631
-#: lib/assembler.c:1647 lib/assembler.c:1664 lib/assembler.c:1680
+#: lib/assembler.c:1344 lib/assembler.c:1376 lib/assembler.c:1633
+#: lib/assembler.c:1650 lib/assembler.c:1666
msgid "Unknow constant type in the meta language"
msgstr ""
-#: lib/assembler.c:1356 lib/assembler.c:1399 lib/assembler.c:1427
+#: lib/assembler.c:1358 lib/assembler.c:1401 lib/assembler.c:1428
msgid ""
"Error in the metalanguage (pattern should be here if not a constant type)"
msgstr ""
-#: lib/assembler.c:1387 lib/assembler.c:1413 lib/assembler.c:1421
-#: lib/assembler.c:1711
+#: lib/assembler.c:1389 lib/assembler.c:1414 lib/assembler.c:1422
+#: lib/assembler.c:1697
msgid "Logical error in meta language"
msgstr ""
@@ -158,74 +158,129 @@ msgstr ""
msgid "Value too large for field"
msgstr ""
-#: lib/assembler.c:1528 lib/assembler.c:1737
+#: lib/assembler.c:1528 lib/assembler.c:1724
msgid "Unknow instruction"
msgstr ""
-#: lib/assembler.c:1553
+#: lib/assembler.c:1554
msgid "Unknow constant"
msgstr ""
-#: lib/assembler.c:1562
+#: lib/assembler.c:1564
msgid "Bad constant for an immediate value"
msgstr ""
-#: lib/assembler.c:1579
+#: lib/assembler.c:1581
msgid "Bad constant for a string"
msgstr ""
-#: lib/assembler.c:1596
+#: lib/assembler.c:1598
msgid "Bad array size"
msgstr ""
-#: lib/assembler.c:1606
+#: lib/assembler.c:1608
msgid "You can only have an instruction into a .text segment"
msgstr ""
-#: lib/assembler.c:1609
+#: lib/assembler.c:1611
msgid "Unmatched instruction"
msgstr ""
-#: lib/assembler.c:1656
-msgid "Can't have a direct value for a relative offset"
+#: lib/assembler.c:1761
+msgid "Error writing file"
+msgstr ""
+
+#: lib/assembler.c:1802
+msgid "Creating temporary files"
+msgstr ""
+
+#: lib/assembler.c:1805
+msgid "Error writing file __text__"
+msgstr ""
+
+#: lib/assembler.c:1809
+msgid "Error writing file __symbols__"
+msgstr ""
+
+#: lib/assembler.c:1813
+msgid "Dumping memory into object file"
+msgstr ""
+
+#: lib/assembler.c:1815
+msgid "Dumping text segment"
+msgstr ""
+
+#: lib/assembler.c:1817 lib/assembler.c:1891 lib/assembler.c:1967
+#, c-format
+msgid "Processing word number %i coming from line %i of the file %s."
+msgstr ""
+
+#: lib/assembler.c:1842 lib/assembler.c:1845 lib/assembler.c:1916
+#: lib/assembler.c:1919
+msgid "Can't evaluate expression for a direct value"
+msgstr ""
+
+#: lib/assembler.c:1848 lib/assembler.c:1922
+msgid "Can only use the diff() function onto labels"
+msgstr ""
+
+#: lib/assembler.c:1853 lib/assembler.c:1857 lib/assembler.c:1927
+#: lib/assembler.c:1931
+msgid "Can only evaluate a diff on local symbols"
msgstr ""
-#: lib/assembler.c:1776
+#: lib/assembler.c:1861 lib/assembler.c:1935
+msgid "Can only evaluate a diff on symbols from the same segment"
+msgstr ""
+
+#: lib/assembler.c:1867 lib/assembler.c:1941
+msgid "Can't evaluate expression"
+msgstr ""
+
+#: lib/assembler.c:1889
+msgid "Dumping data segment"
+msgstr ""
+
+#: lib/assembler.c:1965
+msgid "Dumping bss segment"
+msgstr ""
+
+#: lib/assembler.c:2015
msgid "Loading file"
msgstr ""
-#: lib/assembler.c:1777 lib/meta.c:516
+#: lib/assembler.c:2016 lib/meta.c:516
#, c-format
msgid "Opening file '%s'"
msgstr ""
-#: lib/assembler.c:1785 lib/meta.c:524
+#: lib/assembler.c:2024 lib/meta.c:524
msgid "Reading file"
msgstr ""
-#: lib/assembler.c:1787 lib/meta.c:526
+#: lib/assembler.c:2026 lib/meta.c:526
#, c-format
msgid "Reading line %i"
msgstr ""
-#: lib/assembler.c:1796
+#: lib/assembler.c:2035
#, c-format
msgid "Summering line %s"
msgstr ""
-#: lib/assembler.c:1813
+#: lib/assembler.c:2052
msgid "Opening output file"
msgstr ""
-#: lib/assembler.c:1816
+#: lib/assembler.c:2055
msgid "Error writing output file"
msgstr ""
-#: lib/assembler.c:1820
+#: lib/assembler.c:2059
msgid "Error reading file"
msgstr ""
-#: lib/assembler.c:1822
+#: lib/assembler.c:2061
msgid "Writing output file"
msgstr ""
@@ -349,10 +404,35 @@ msgstr ""
msgid "Error context empty, but popcontext() called."
msgstr ""
+#: lib/interne.c:25
+msgid "ResetBit: Incorrect Value"
+msgstr ""
+
+#: lib/interne.c:37
+msgid "SetBit: Incorrect Value"
+msgstr ""
+
+#: lib/interne.c:49
+msgid "ValeurBit: Incorrect Value"
+msgstr ""
+
+#: lib/simulator.c:52
+msgid "Adresse: Unmatched Addr Field"
+msgstr ""
+
#: lib/fpu.c:14
msgid "FPU not implemented"
msgstr ""
+#: lib/memoire.c:25 lib/memoire.c:37
+msgid "Invalid Memory Adress"
+msgstr ""
+
+#. Si on voudrait diminuer le nombre de registres
+#: lib/registre.c:76 lib/registre.c:92 lib/registre.c:106 lib/registre.c:120
+msgid "Invalid Register Descriptor"
+msgstr ""
+
#: src/compilo.c:15
msgid ""
"Assembler\n"
diff --git a/po/cat-id-tbl.c b/po/cat-id-tbl.c
index e650a97..2c1c253 100644
--- a/po/cat-id-tbl.c
+++ b/po/cat-id-tbl.c
@@ -50,69 +50,88 @@ Error in the metalanguage (pattern should be here if not a constant type)", 31},
{"Bad array size", 40},
{"You can only have an instruction into a .text segment", 41},
{"Unmatched instruction", 42},
- {"Can't have a direct value for a relative offset", 43},
- {"Loading file", 44},
- {"Opening file '%s'", 45},
- {"Reading file", 46},
- {"Reading line %i", 47},
- {"Summering line %s", 48},
- {"Opening output file", 49},
- {"Error writing output file", 50},
- {"Error reading file", 51},
- {"Writing output file", 52},
- {"Internal error into hashing", 53},
- {"Read line '%s'", 54},
- {"Analysing word '%s'", 55},
- {"Missing operator ':'", 56},
- {"Invalid number.", 57},
- {"Expecting ';' for field separator.", 58},
- {"Expecting ',' for field separator.", 59},
- {"Identifier incorrect.", 60},
- {"Error: Expecting a . after a =", 61},
- {"Extra parameters for field 'p'.", 62},
- {"Unexpected char at end of line.", 63},
- {"Expecting operator '=' for field 'p'.", 64},
- {"Error: character . expected.", 65},
- {"= expected after an implicit name", 66},
- {"Identifier incorrect", 67},
- {"expecting ; as field separator", 68},
- {"Loading meta file", 69},
- {"Meta parser init failed.", 70},
- {"Too many nested operators in expression.\n", 71},
- {"Too many nested functions calls in expression.\n", 72},
- {"Invalid unary operator", 73},
- {"Invalid binary operator", 74},
- {"Parse error: too much left parenthesis", 75},
- {"Parse error: too much right parenthesis", 76},
- {"Parse error: enclosure mismatch", 77},
- {"Invalid character", 78},
- {"Out of memory.", 79},
- {"Too much error contexts during pushcontext().", 80},
- {"Error context empty, but popcontext() called.", 81},
- {"FPU not implemented", 82},
+ {"Error writing file", 43},
+ {"Creating temporary files", 44},
+ {"Error writing file __text__", 45},
+ {"Error writing file __symbols__", 46},
+ {"Dumping memory into object file", 47},
+ {"Dumping text segment", 48},
+ {"Processing word number %i coming from line %i of the file %s.", 49},
+ {"Can't evaluate expression for a direct value", 50},
+ {"Can only use the diff() function onto labels", 51},
+ {"Can only evaluate a diff on local symbols", 52},
+ {"Can only evaluate a diff on symbols from the same segment", 53},
+ {"Can't evaluate expression", 54},
+ {"Dumping data segment", 55},
+ {"Dumping bss segment", 56},
+ {"Loading file", 57},
+ {"Opening file '%s'", 58},
+ {"Reading file", 59},
+ {"Reading line %i", 60},
+ {"Summering line %s", 61},
+ {"Opening output file", 62},
+ {"Error writing output file", 63},
+ {"Error reading file", 64},
+ {"Writing output file", 65},
+ {"Internal error into hashing", 66},
+ {"Read line '%s'", 67},
+ {"Analysing word '%s'", 68},
+ {"Missing operator ':'", 69},
+ {"Invalid number.", 70},
+ {"Expecting ';' for field separator.", 71},
+ {"Expecting ',' for field separator.", 72},
+ {"Identifier incorrect.", 73},
+ {"Error: Expecting a . after a =", 74},
+ {"Extra parameters for field 'p'.", 75},
+ {"Unexpected char at end of line.", 76},
+ {"Expecting operator '=' for field 'p'.", 77},
+ {"Error: character . expected.", 78},
+ {"= expected after an implicit name", 79},
+ {"Identifier incorrect", 80},
+ {"expecting ; as field separator", 81},
+ {"Loading meta file", 82},
+ {"Meta parser init failed.", 83},
+ {"Too many nested operators in expression.\n", 84},
+ {"Too many nested functions calls in expression.\n", 85},
+ {"Invalid unary operator", 86},
+ {"Invalid binary operator", 87},
+ {"Parse error: too much left parenthesis", 88},
+ {"Parse error: too much right parenthesis", 89},
+ {"Parse error: enclosure mismatch", 90},
+ {"Invalid character", 91},
+ {"Out of memory.", 92},
+ {"Too much error contexts during pushcontext().", 93},
+ {"Error context empty, but popcontext() called.", 94},
+ {"ResetBit: Incorrect Value", 95},
+ {"SetBit: Incorrect Value", 96},
+ {"ValeurBit: Incorrect Value", 97},
+ {"Adresse: Unmatched Addr Field", 98},
+ {"FPU not implemented", 99},
+ {"Invalid Memory Adress", 100},
+ {"Invalid Register Descriptor", 101},
{"\
Assembler\n\
-\n", 83},
- {" o Initialising the meta engine... ", 84},
+\n", 102},
+ {" o Initialising the meta engine... ", 103},
{"\
Done!\n\
- o Meta language loading... ", 85},
- {"Meta language loading failed.", 86},
+ o Meta language loading... ", 104},
+ {"Meta language loading failed.", 105},
{"\
Done!\n\
- o Initialising the assembler core...", 87},
- {"Assembler core init failed.", 88},
- {" Done!\n", 89},
- {"Signal received: segfault", 90},
+ o Initialising the assembler core...", 106},
+ {"Assembler core init failed.", 107},
+ {" Done!\n", 108},
+ {"Signal received: segfault", 109},
{"\
\n\
Performing initialisation...\n\
-\n", 91},
+\n", 110},
{"\
\n\
Performing shutdown...\n\
-\n", 92},
- {"Exitting, bye!\n", 93},
+\n", 111},
+ {"Exitting, bye!\n", 112},
};
-int _msg_tbl_length = 93;
+int _msg_tbl_length = 112;
diff --git a/src/compilo.c b/src/compilo.c
index 3f214a6..883bd81 100644
--- a/src/compilo.c
+++ b/src/compilo.c
@@ -49,7 +49,7 @@ void segfaulthand(int i) {
int main(void) {
invite();
-/* signal(SIGSEGV, segfaulthand);*/
+/* signal(SIGSEGV, segfaulthand); */
fprintf(stderr, _("\nPerforming initialisation...\n\n"));
init_all();