def init(match)
    self.match = match
    match = match[0] if match.kind_of?(Array) && match.length == 1
    case match
    when String then    init_string match
    when Regexp then    init_regex match
    when Symbol then    init_rule match
    when PatternElementHash then      init_hash match
    when Array then     init_array match
    else                raise "invalid pattern type: #{match.inspect}"
    end
  end
def init(match)
    self.match = match
    match = match[0] if match.kind_of?(Array) && match.length == 1
    case match
    when String then    init_string match
    when Regexp then    init_regex match
    when Symbol then    init_rule match
    when PatternElementHash then      init_hash match
    when Array then     init_array match
    else                raise "invalid pattern type: #{match.inspect}"
    end
  end
initialize PatternElement based on the type of: match