class Pione::Lang::DataExprSequence

Public Instance Methods

"==="(name)
Alias for: match
"=~"(name)

This alias is for RINDA’s template matcher.

Alias for: match?
accept_nonexistence?() click to toggle source

Return true if the sequence accepts null.

# File lib/pione/lang/data-expr.rb, line 99
def accept_nonexistence?
  pieces.any?{|piece| piece.accept_nonexistence?}
end
assertive?() click to toggle source

Return true if the sequence has no null.

# File lib/pione/lang/data-expr.rb, line 104
def assertive?
  not(pieces.all?{|piece| piece.kind_of? DataExprNull})
end
match(name) click to toggle source

Match if the name is matched one of elements.

# File lib/pione/lang/data-expr.rb, line 109
def match(name)
  pieces.inject(nil) {|res, piece| res ? res : piece.match(name)}
end
Also aliased as: "==="
match?(name) click to toggle source

Return true if the name matched.

# File lib/pione/lang/data-expr.rb, line 115
def match?(name)
  match(name) ? true : false
end
Also aliased as: "=~"
textize() click to toggle source
# File lib/pione/lang/data-expr.rb, line 121
def textize
  "(<d>%s)" % pieces.map {|piece| "'%s'" % piece.pattern}.join("|")
end