class KPeg::NotPredicate
Attributes
op[R]
Public Class Methods
new(op)
click to toggle source
Calls superclass method
KPeg::Operator::new
# File lib/kpeg/grammar.rb, line 359 def initialize(op) super() @op = op end
Public Instance Methods
==(obj)
click to toggle source
Calls superclass method
# File lib/kpeg/grammar.rb, line 374 def ==(obj) case obj when NotPredicate @op == obj.op else super end end
inspect()
click to toggle source
# File lib/kpeg/grammar.rb, line 383 def inspect inspect_type "notp", @op.inspect end
match(x)
click to toggle source
# File lib/kpeg/grammar.rb, line 366 def match(x) pos = x.pos m = @op.match(x) x.pos = pos return m ? nil : MatchString.new(self, "") end