summaryrefslogtreecommitdiff
path: root/PE/compil.lex
diff options
context:
space:
mode:
Diffstat (limited to 'PE/compil.lex')
-rw-r--r--PE/compil.lex14
1 files changed, 8 insertions, 6 deletions
diff --git a/PE/compil.lex b/PE/compil.lex
index 91fe11d..76d3dbe 100644
--- a/PE/compil.lex
+++ b/PE/compil.lex
@@ -10,11 +10,7 @@
yputc(d);
}
-"\n<CLOSE>\n" {
- yputc(0xff);
-}
-
-"<UNK "[[:xdigit:]]{2}">" {
+"<UNK "[[:xdigit:]]+">" {
int d = strtoul(yytext + 5, NULL, 16);
yputc(d);
}
@@ -49,6 +45,8 @@
yputc(d);
}
+"\n<CLOSE>\n" yputc(0xff);
+"<CLOSE>\n" { yputc(0xf7); yputc(0xff); }
"<AYA>" yputc(0xfa);
"\n<TCLOSE>\n" yputc(0xf9);
"<PAUSE>\n" yputc(0xf8);
@@ -57,6 +55,10 @@
"<ae>" yputc(0x5c);
"<oe>" yputc(0x5d);
+"<"[^>]*">" {
+ fprintf(stderr, "Commande inconnue ligne %i: %s\n", yylineno, yytext);
+}
+
. {
int i, trouve = 0;
for (i = 0; i <= MAXCHAR; i++) {
@@ -67,7 +69,7 @@
}
if (!trouve) {
- fprintf(stderr, "Caractère inconnu ligne %i: %s\n", yylineno, yytext);
+ fprintf(stderr, "Caractère inconnu ligne %i: %s\n", yylineno, yytext);
}
}