def get_field_infos(code, free_format):
offset = <NUM_LIT:0><EOL>field_infos = []<EOL>lines = _clean_code(code)<EOL>previous_offset = <NUM_LIT:0><EOL>for row in process_cobol(lines, free_format):<EOL><INDENT>fi = PicFieldInfo()<EOL>fi.name = row["<STR_LIT:name>"]<EOL>fi.level = row["<STR_LIT>"]<EOL>fi.pic = row["<STR_LIT>"]<EOL>fi.occurs = row["<STR_LIT>"]<EOL>fi.redefines = row["<STR_LIT>"]<EOL>fi.indexed_by = row["<STR_LIT>"]<EOL>if fi.redefines:<EOL><INDENT>for fib in field_infos:<EOL><INDENT>if fib.name == fi.redefines:<EOL><INDENT>offset = fib.offset<EOL><DEDENT><DEDENT><DEDENT>if fi.level == <NUM_LIT:1>:<EOL><INDENT>offset = <NUM_LIT:1><EOL><DEDENT>if fi.level == <NUM_LIT>:<EOL><INDENT>offset = <NUM_LIT:0><EOL><DEDENT>if fi.level == <NUM_LIT>:<EOL><INDENT>offset = <NUM_LIT:1><EOL><DEDENT>fi.offset = offset<EOL>if fi.level == <NUM_LIT>:<EOL><INDENT>fi.offset = previous_offset<EOL><DEDENT>else:<EOL><INDENT>previous_offset = offset<EOL><DEDENT>field_infos.append(fi)<EOL>if row['<STR_LIT>']:<EOL><INDENT>offset += row['<STR_LIT>']['<STR_LIT>']<EOL><DEDENT><DEDENT>return field_infos<EOL>
Gets the list of pic fields information from line |start| to line |end|.

:param code: code to parse

:returns: the list of pic fields info found in the specified text.