summaryrefslogtreecommitdiff
path: root/PE/compil.lex
diff options
context:
space:
mode:
Diffstat (limited to 'PE/compil.lex')
-rw-r--r--PE/compil.lex16
1 files changed, 9 insertions, 7 deletions
diff --git a/PE/compil.lex b/PE/compil.lex
index 76d3dbe..cda7fa0 100644
--- a/PE/compil.lex
+++ b/PE/compil.lex
@@ -2,10 +2,16 @@
#define yputc(a) putc(a, yyout)
#include "table.h"
+ int oldpt = -1;
+
%%
"<PT"[[:digit:]]+">\n" {
int d = atoi(yytext + 3);
+ if (d != (oldpt + 1)) {
+ fprintf(stderr, "Pointeur incorrect ligne %i: %i\n", yylineno, d);
+ }
+ oldpt = d;
yputc(0xfe);
yputc(d);
}
@@ -15,14 +21,10 @@
yputc(d);
}
-"<TAG0>" {
- yputc(0xfb);
- yputc(0);
-}
-
-"<TAG1>" {
+"<TAG"[[:digit:]]+">" {
+ int d = atoi(yytext + 4);
yputc(0xfb);
- yputc(1);
+ yputc(d);
}
"<CHOICES "[[:digit:]]+">\n" {