X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=mTaskInterpret.dcl;h=53bb69bd43add0c0cd24cb8d591127d5018b943a;hb=ce48250dbf5d93a0617c7683db9959f2fcacacc6;hp=32e7b9b17bc170db695a5123f9256ed5b804c206;hpb=7a67ef5e2af69cb14011be201fe67f755b91a788;p=mTask.git diff --git a/mTaskInterpret.dcl b/mTaskInterpret.dcl index 32e7b9b..53bb69b 100644 --- a/mTaskInterpret.dcl +++ b/mTaskInterpret.dcl @@ -9,15 +9,41 @@ import mTask | BCPush String | BCPop //Unary ops - | BCNeg | BCNot //Binary Int ops | BCAdd | BCSub | BCMul | BCDiv + //Binary Bool ops + | BCAnd + | BCOr + | BCEq + | BCNeq + | BCLes + | BCGre + | BCLeq + | BCGeq + //Conditionals and jumping + | BCJmp Int + | BCJmpT Int + | BCJmpF Int + //Serial + | BCSerialAvail + | BCSerialPrint + | BCSerialPrintln + | BCSerialRead + | BCSerialParseInt + //Pins + | BCAnalogRead String + | BCAnalogWrite String + | BCDigitalRead String + | BCDigitalWrite String + | BCTest AnalogPin -:: ByteCode a p = BC ((ReadWrite (ByteCode a Expr)) BCState -> ([BC], BCState)) +//:: ByteCode a p = BC (BCState -> ([BC], BCState)) +:: ByteCode a p = BC [BC] +//:: ByteCode a p = BC ((ReadWrite (ByteCode a Expr)) BCState -> ([BC], BCState)) :: BCState = { a::() }