class Crystush::Program
- Crystush::Program
- Reference
- Object
Defined in:
crystush/program.crConstant Summary
-
INSTRUCTIONS =
["BOOLEAN.=", "BOOLEAN.AND", "BOOLEAN.DUP", "BOOLEAN.FLUSH", "BOOLEAN.FROMFLOAT", "BOOLEAN.FROMINTEGER", "BOOLEAN.NOT", "BOOLEAN.OR", "BOOLEAN.POP", "BOOLEAN.STACKDEPTH", "BOOLEAN.SWAP", "CODE.DO", "CODE.DUP", "CODE.IF", "CODE.QUOTE", "FLOAT.%", "FLOAT.*", "FLOAT.+", "FLOAT.-", "FLOAT./", "FLOAT.<", "FLOAT.=", "FLOAT.>", "FLOAT.COS", "FLOAT.DUP", "FLOAT.FLUSH", "FLOAT.FROMBOOLEAN", "FLOAT.FROMINTEGER", "FLOAT.MAX", "FLOAT.MIN", "FLOAT.POP", "FLOAT.SIN", "FLOAT.STACKDEPTH", "FLOAT.SWAP", "FLOAT.TAN", "INTEGER.%", "INTEGER.*", "INTEGER.+", "INTEGER.-", "INTEGER./", "INTEGER.<", "INTEGER.=", "INTEGER.>", "INTEGER.DUP", "INTEGER.FLUSH", "INTEGER.FROMBOOLEAN", "INTEGER.FROMFLOAT", "INTEGER.MAX", "INTEGER.MIN", "INTEGER.POP", "INTEGER.STACKDEPTH", "INTEGER.SWAP"]
Constructors
Instance Method Summary
- #breakup_list(list_token : String) : Array(String)
- #configuration : Configuration
- #configuration=(configuration : Configuration)
- #evaluate(stacks = PushStacks.new) : PushStacks
- #execute_boolean_instruction(instruction : String, stacks : PushStacks)
- #execute_code_instruction(instruction : String, stacks : PushStacks)
- #execute_float_instruction(instruction : String, stacks : PushStacks)
- #execute_instruction(instruction : String, stacks : PushStacks)
- #execute_integer_instruction(instruction : String, stacks : PushStacks)
- #is_instruction(token : String) : Bool
- #is_list(token : String) : Bool
- #program : String
- #program=(program : String)