spec/spec_helper.rb in raabro-1.0.0 vs spec/spec_helper.rb in raabro-1.0.1
- old
+ new
@@ -42,17 +42,10 @@
def num(i); rex(:num, i, /-?[0-9]+/); end
def op(i); rex(:op, i, /[+\-*\/]/); end
def item(i); alt(:item, i, :num, :op); end
def suite(i); jseq(nil, i, :item, :sp); end
-
- # entry point
-
- def parse(input)
-
- all(nil, Raabro::Input.new(input, :prune => true), :suite)
- end
end
module Sample::Arith include Raabro
def number(i); rex(:number, i, /-?[0-9]+\s*/); end
@@ -61,12 +54,7 @@
def addition(i); seq(:addition, i, :number, :plus, :op_or_num); end
def substraction(i); seq(:substraction, i, :number, :minus, :op_or_num); end
def op_or_num(i); alt(nil, i, :addition, :substraction, :number); end
-
- def parse(input)
-
- all(nil, Raabro::Input.new(input, prune: true), :op_or_num)
- end
end