def parse(parent_node)
    #return parse_nongreedy_optional(src,offset,parent_node) # nongreedy optionals break standard PEG
    node = variant_node_class.new(parent_node, delimiter_pattern)

    node.match parser.delimiter_pattern if root_rule?

    pattern_elements.each do |pe|
      return unless node.match(pe)
    end
    node.pop_match if node.last_match && node.last_match.delimiter

    node.match parser.delimiter_pattern if root_rule?

    node && node.post_match_processing
  end
def parse(parent_node)
    #return parse_nongreedy_optional(src,offset,parent_node) # nongreedy optionals break standard PEG
    node = variant_node_class.new(parent_node, delimiter_pattern)

    node.match parser.delimiter_pattern if root_rule?

    pattern_elements.each do |pe|
      return unless node.match(pe)
    end
    node.pop_match if node.last_match && node.last_match.delimiter

    node.match parser.delimiter_pattern if root_rule?

    node && node.post_match_processing
  end
returns a Node object if it matches, nil otherwise