Skip to content

Commit ff2f325

Browse files
committed
typed statements
1 parent 14c2558 commit ff2f325

File tree

1 file changed

+61
-2
lines changed

1 file changed

+61
-2
lines changed

bil.ott

Lines changed: 61 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ defns reduce_stmt :: '' ::=
498498

499499

500500
defns typing_exp :: '' ::=
501-
defn exp '::' type :: :: type :: t_ by
501+
defn exp '::' type :: :: type_exp :: t_ by
502502

503503

504504
----------------- :: var
@@ -571,4 +571,63 @@ defns typing_exp :: '' ::=
571571
e1 :: imm<sz1>
572572
e2 :: imm<sz2>
573573
---------------------------------- :: concat
574-
e1 @ e2 :: imm<sz1+sz2>
574+
e1 @ e2 :: imm<sz1+sz2>
575+
576+
577+
defns typing_stmt :: '' ::=
578+
defn stmt is ok :: :: type_stmt :: t_ by
579+
580+
581+
var :: t
582+
exp :: t
583+
--------------------------- :: move
584+
var := exp is ok
585+
586+
587+
exp :: imm<nat>
588+
--------------------------- :: jmp
589+
jmp exp is ok
590+
591+
592+
--------------------------- :: cpuexn
593+
cpuexn(num) is ok
594+
595+
596+
---------------------------- :: special
597+
special(str) is ok
598+
599+
600+
e :: imm<1>
601+
seq is ok
602+
---------------------------- :: while
603+
while (e) seq is ok
604+
605+
606+
e :: imm<1>
607+
seq is ok
608+
---------------------------- :: ifthen
609+
if (e) seq is ok
610+
611+
612+
e :: imm<1>
613+
seq1 is ok
614+
seq2 is ok
615+
---------------------------- :: if
616+
if (e) seq1 else seq2 is ok
617+
618+
619+
defn seq is ok :: :: type_seq :: t_ by
620+
621+
stmt is ok
622+
------------------------------ :: seq_one
623+
{stmt} is ok
624+
625+
s1 is ok
626+
s2 is ok
627+
----------------------------- :: seq_two
628+
{s1;s2} is ok
629+
630+
s1 is ok
631+
{s2; ..; sn} is ok
632+
------------------------------ :: seq_rec
633+
{s1; s2; ..; sn} is ok

0 commit comments

Comments
 (0)