Class: RBNF::Cat

Inherits:
Binary show all
Defined in:
lib/rbnf/nodes.rb

Overview

Catenation node

Constant Summary

Constants included from RBNF

DEFS, VERSION

Instance Attribute Summary

Attributes inherited from Binary

#a, #b

Instance Method Summary collapse

Methods inherited from Binary

#initialize

Methods included from RBNF

#=~, [], #alt, #cat, #comps, def, define, dememoize, #except, #group, method_missing, #opt, #rep, #rep_n

Constructor Details

This class inherits a constructor from RBNF::Binary

Instance Method Details

#match(s) ⇒ Object



50
51
52
# File 'lib/rbnf/nodes.rb', line 50

def match(s)
  a.comps(s).any? {|c| b=~c}
end

#to_sObject



47
48
49
# File 'lib/rbnf/nodes.rb', line 47

def to_s
  "#{a} , #{b}"
end