#NEWLINE# def get_variable_from_line( a_project , a_variable_line ) : #NEWLINE# #INDENT# '\n        Parse a variable declaration line (like "a, b, c:INTEGER")\n        and return a list of tuple containing 0: variable name,\n        1: Type, 2: Generic, 3: Empty string (those feature are not\n        obsolete)\n    ' #NEWLINE# l_variable_regex = a_project . get_tools_regex ( 'extract_local_variable' ) #NEWLINE# l_variable_values = l_variable_regex . findall ( a_variable_line ) #NEWLINE# l_result = [ ] #NEWLINE# if l_variable_values : #NEWLINE# #INDENT# l_variable_names = l_variable_values [ 0 ] [ 0 ] . replace ( ' ' , '' ) . replace ( '\t' , '' ) . split ( ',' ) #NEWLINE# for name in l_variable_names : #NEWLINE# #INDENT# l_result . append ( ( name , l_variable_values [ 0 ] [ 1 ] , l_variable_values [ 0 ] [ 2 ] , '' ) ) #NEWLINE# #UNINDENT# #UNINDENT# return l_result