class Crystush::Program

Defined in:

crystush/program.cr

Constant 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

Constructor Detail

def self.new(program : String) #

[View source]

Instance Method Detail

def breakup_list(list_token : String) : Array(String) #

[View source]
def configuration : Configuration #

[View source]
def configuration=(configuration : Configuration) #

[View source]
def evaluate(stacks = PushStacks.new) : PushStacks #

[View source]
def execute_boolean_instruction(instruction : String, stacks : PushStacks) #

[View source]
def execute_code_instruction(instruction : String, stacks : PushStacks) #

[View source]
def execute_float_instruction(instruction : String, stacks : PushStacks) #

[View source]
def execute_instruction(instruction : String, stacks : PushStacks) #

[View source]
def execute_integer_instruction(instruction : String, stacks : PushStacks) #

[View source]
def is_instruction(token : String) : Bool #

[View source]
def is_list(token : String) : Bool #

[View source]
def program : String #

[View source]
def program=(program : String) #

[View source]