summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compil.lex27
1 files changed, 27 insertions, 0 deletions
diff --git a/compil.lex b/compil.lex
index 1bac4f2..b8cf4f0 100644
--- a/compil.lex
+++ b/compil.lex
@@ -3,6 +3,8 @@
%s I
/* In port block */
%s P
+ /* In delay block */
+%s D
/* In unknown 1 block */
%s U1
/* In unknown 2 block, arg1 */
@@ -97,6 +99,31 @@
BEGIN(P);
}
+<I>"<ssync/>" {
+ putcode(18);
+ }
+
+<I>"<delay t=\""[[:digit:]]+"\" " {
+ arg1 = atoi(yytext + 10);
+ BEGIN(D);
+ }
+
+<D>"u=\""[[:digit:]]+"\"/>" {
+ int d = atoi(yytext + 3);
+ putcode2(17, d, arg1);
+ BEGIN(I);
+ }
+
+<I>"<delay0 t=\""[[:digit:]]+"\"/>" {
+ int t = atoi(yytext + 11);
+ putcode2(17, t, 0);
+ }
+
+<I>"<delay1 t=\""[[:digit:]]+"\"/>" {
+ int t = atoi(yytext + 11);
+ putcode2(17, t, 1);
+ }
+
<P>"a2=\""[[:digit:]]+"\"/>" {
int d = atoi(yytext + 4);
putcode2(19, arg1, d);