def line_to_variables(source, line, inherit_permission, parent):
vartype, kind, strlen, proto, rest = parse_type(line,parent.strings,parent.settings)<EOL>attribs = []<EOL>intent = "<STR_LIT>"<EOL>optional = False<EOL>permission = inherit_permission<EOL>parameter = False<EOL>attribmatch = ATTRIBSPLIT_RE.match(rest)<EOL>if attribmatch:<EOL><INDENT>attribstr = attribmatch.group(<NUM_LIT:1>).strip()<EOL>declarestr = attribmatch.group(<NUM_LIT:2>).strip()<EOL>tmp_attribs = ford.utils.paren_split("<STR_LIT:U+002C>",attribstr)<EOL>for i in range(len(tmp_attribs)):<EOL><INDENT>tmp_attribs[i] = tmp_attribs[i].strip()<EOL>if tmp_attribs[i].lower() == "<STR_LIT>": permission = "<STR_LIT>"<EOL>elif tmp_attribs[i].lower() == "<STR_LIT>": permission = "<STR_LIT>"<EOL>elif tmp_attribs[i].lower() == "<STR_LIT>": permission = "<STR_LIT>"<EOL>elif tmp_attribs[i].lower() == "<STR_LIT>": optional = True<EOL>elif tmp_attribs[i].lower() == "<STR_LIT>": parameter = True<EOL>elif tmp_attribs[i].lower().replace('<STR_LIT:U+0020>','<STR_LIT>') == "<STR_LIT>":<EOL><INDENT>intent = '<STR_LIT>'<EOL><DEDENT>elif tmp_attribs[i].lower().replace('<STR_LIT:U+0020>','<STR_LIT>') == "<STR_LIT>":<EOL><INDENT>intent = '<STR_LIT>'<EOL><DEDENT>elif tmp_attribs[i].lower().replace('<STR_LIT:U+0020>','<STR_LIT>') == "<STR_LIT>":<EOL><INDENT>intent = '<STR_LIT>'<EOL><DEDENT>else: attribs.append(tmp_attribs[i])<EOL><DEDENT><DEDENT>else:<EOL><INDENT>declarestr = ATTRIBSPLIT2_RE.match(rest).group(<NUM_LIT:2>)<EOL><DEDENT>declarations = ford.utils.paren_split("<STR_LIT:U+002C>",declarestr)<EOL>varlist = []<EOL>for dec in declarations:<EOL><INDENT>dec = re.sub("<STR_LIT:U+0020>","<STR_LIT>",dec)<EOL>split = ford.utils.paren_split('<STR_LIT:=>',dec)<EOL>if len(split) > <NUM_LIT:1>:<EOL><INDENT>name = split[<NUM_LIT:0>]<EOL>if split[<NUM_LIT:1>][<NUM_LIT:0>] == '<STR_LIT:>>':<EOL><INDENT>initial = split[<NUM_LIT:1>][<NUM_LIT:1>:]<EOL>points = True<EOL><DEDENT>else:<EOL><INDENT>initial = split[<NUM_LIT:1>]<EOL>points = False<EOL><DEDENT><DEDENT>else:<EOL><INDENT>name = dec.strip()<EOL>initial = None<EOL>points = False<EOL><DEDENT>if initial:<EOL><INDENT>initial = COMMA_RE.sub('<STR_LIT:U+002CU+0020>',initial)<EOL>search_from = <NUM_LIT:0><EOL>while QUOTES_RE.search(initial[search_from:]):<EOL><INDENT>num = int(QUOTES_RE.search(initial[search_from:]).group()[<NUM_LIT:1>:-<NUM_LIT:1>])<EOL>old_string = NBSP_RE.sub('<STR_LIT>',parent.strings[num])<EOL>string = '<STR_LIT>'<EOL>for i in range(len(old_string)):<EOL><INDENT>if old_string[i] == "<STR_LIT:\\>" and (old_string[i+<NUM_LIT:1>] in '<STR_LIT>' or<EOL>old_string[i+<NUM_LIT:1>] == '<STR_LIT:g>'):<EOL><INDENT>string += r'<STR_LIT:\\>'<EOL><DEDENT>elif old_string[i] == '<STR_LIT:(>' and old_string[i+<NUM_LIT:1>] =='<STR_LIT:?>':<EOL><INDENT>string += r'<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>string += old_string[i]<EOL><DEDENT><DEDENT>initial = initial[<NUM_LIT:0>:search_from] + QUOTES_RE.sub(string,initial[search_from:],count=<NUM_LIT:1>)<EOL>search_from += QUOTES_RE.search(initial[search_from:]).end(<NUM_LIT:0>)<EOL><DEDENT><DEDENT>if proto:<EOL><INDENT>varlist.append(FortranVariable(name,vartype,parent,copy.copy(attribs),intent,<EOL>optional,permission,parameter,kind,strlen,list(proto),<EOL>[],points,initial))<EOL><DEDENT>else:<EOL><INDENT>varlist.append(FortranVariable(name,vartype,parent,copy.copy(attribs),intent,<EOL>optional,permission,parameter,kind,strlen,proto,<EOL>[],points,initial))<EOL><DEDENT><DEDENT>doc = []<EOL>docline = source.__next__()<EOL>while docline[<NUM_LIT:0>:<NUM_LIT:2>] == "<STR_LIT:!>" + parent.settings['<STR_LIT>']:<EOL><INDENT>doc.append(docline[<NUM_LIT:2>:])<EOL>docline = source.__next__()<EOL><DEDENT>source.pass_back(docline)<EOL>for var in varlist: var.doc = doc<EOL>return varlist<EOL>
Returns a list of variables declared in the provided line of code. The
line of code should be provided as a string.