diff options
Diffstat (limited to 'DSL/Types.hs')
| -rw-r--r-- | DSL/Types.hs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/DSL/Types.hs b/DSL/Types.hs index bb1f862..0a4de3f 100644 --- a/DSL/Types.hs +++ b/DSL/Types.hs @@ -42,9 +42,12 @@ data Intrinsic | I_GREATERTHAN deriving (Show, Eq) +type ProcName = String + data Operation = OpPushData StackData | OpIntrinsic Intrinsic + | OpCall ProcName deriving (Show) data StackModifier = StackModifier { smName :: String @@ -59,14 +62,18 @@ data Block | BWhile [Block] [Block] deriving (Show) +type ProcSpec = (ProcName, [Block]) + type Program = [Block] data Machine = Machine { ok :: Bool , stack :: Stack + , pTable :: [(ProcName, [Block])] } data TokenTag = T_WHITESPACE + | T_PROC | T_IF | T_ELSE | T_WHILE @@ -76,6 +83,7 @@ data TokenTag | T_BOOL_LITERAL | T_STRING_LITERAL | T_INTRINSIC Intrinsic + | T_IDENTIFIER deriving (Show, Eq) data Token = Token { tStr :: String -- original text |
