lib/parser/multiline_rule.rb
# calls rule code block for every line of input string
calls rule code block for every line of input string
calls rule code block for every line of input string
def parse(code_line, data_lines_array = nil)
    data_array = []
    matched_data = code_line.match(@expression).to_a
    unless data_lines_array.nil?
      matched_subobjects = data_lines_array.collect do |data_line|
        data_line.match(@multiline_expression).to_a unless @multiline_expression.nil?
      end
    end
    [ @production_code.call(matched_data, matched_subobjects) ]
  end
def parse ( code_line , data_lines_array = nil ) data_array = [ ] matched_data = code_line . match ( @expression ) . to_a unless data_lines_array . nil? matched_subobjects = data_lines_array . collect do | data_line | data_line . match ( @multiline_expression ) . to_a unless @multiline_expression . nil? end end [ @production_code . call ( matched_data , matched_subobjects ) ] end
calls rule code block for every line of input string
calls rule code block for every line of input string
code_line
<not_specific>
data_lines_array
<not_specific>