summaryrefslogtreecommitdiff
path: root/compil.lex
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2012-10-28 23:44:09 -0700
committerPixel <pixel@nobis-crew.org>2012-10-28 23:44:09 -0700
commit0fbf22d5fe5b7e07377ee9f133ab812e1a1fbdac (patch)
treeda8def60e254e164d6db08c76becd8d3475d8252 /compil.lex
parent2365582733668c3018ee2b04a7cd27e57e3cc550 (diff)
Adding the new tags in the compilation code.
Diffstat (limited to 'compil.lex')
-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);