module RPN

Defined in:

rpn.cr
rpn/lexer.cr
rpn/operators.cr

Constant Summary

ASCII_OPERATOR_TABLE = begin table = Pointer(Operator).malloc(256, Operator::Invalid) Operator.values.each do |op| if op.ascii_code > 0 table[op.ascii_code] = op end end table end
VERSION = "0.1.0"

Class Method Summary

Class Method Detail

def self.[](op) : Operator #

[View source]
def self.execute(rpn) : Float64 #

[View source]
def self.execute_infix(string) #

[View source]
def self.execute_string(string) #

[View source]
def self.from_infix(string) : Array(Operator | Float64) #

[View source]
def self.from_string(string) : Array(Operator | Float64) #

[View source]