/usr/share/doc/ruby-treetop/examples/lambda_calculus/arithmetic_node_classes.rb is in ruby-treetop 1.4.10-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 | module Arithmetic
class BinaryOperation < Treetop::Runtime::SyntaxNode
def eval(env={})
tail.elements.inject(head.eval(env)) do |value, element|
element.operator.apply(value, element.operand.eval(env))
end
end
end
end
|