From 9642c92eec54a2fd1b12860bd45c0f39046f66f2 Mon Sep 17 00:00:00 2001 From: Slavasil Date: Mon, 23 Mar 2026 11:11:37 +0300 Subject: [PATCH] remove prints in parser --- lib/ruby_algebra/parser.rb | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/ruby_algebra/parser.rb b/lib/ruby_algebra/parser.rb index 05c8086..77e4b8b 100644 --- a/lib/ruby_algebra/parser.rb +++ b/lib/ruby_algebra/parser.rb @@ -116,7 +116,6 @@ module RubyAlgebra elsif c == " " i += 1 else - puts "Unrecognized character at pos #{i}" i += 1 end end @@ -127,7 +126,6 @@ module RubyAlgebra operators = [] out_stack = [] tokenize(expr) do |token| - pp token if token.type == :num out_stack.push(Constant.new(token.value)) elsif token.type == :end @@ -166,9 +164,6 @@ module RubyAlgebra b = out_stack.pop if oper.type == :op a = out_stack.pop - puts "make unary op #{oper.op} from (#{a})" if oper.type == :unary_op - puts "make binary op #{oper.op} from (#{a}), (#{b})" if oper.type == :op - case oper.op when :add out_stack.push Addition.new(a, b)