Add parser2.rb file to calculate dot product