def p_file_input(p):
 if isinstance(p[(len(p) - 1)], basestring):
  if (len(p) == 3):
   p[0] = p[1]
  else:
   p[0] = []
 elif (len(p) == 3):
  p[0] = (p[1] + p[2])
 else:
  p[0] = p[1]

def p_file_input ( p ) : if isinstance ( p [ ( len ( p ) - 1 ) ] , basestring ) : if ( len ( p ) == 3 ) : p [ 0 ] = p [ 1 ] else : p [ 0 ] = [ ] elif ( len ( p ) == 3 ) : p [ 0 ] = ( p [ 1 ] + p [ 2 ] ) else : p [ 0 ] = p [ 1 ]
file_input : file_input newline | file_input stmt | newline | stmt .