def explain_c_declaration(c_decl):
 parser = c_parser.CParser()
 try:
  node = parser.parse(c_decl, filename='<stdin>')
 except c_parser.ParseError:
  e = sys.exc_info()[1]
  return ('Parse error:' + str(e))
 if ((not isinstance(node, c_ast.FileAST)) or (not isinstance(node.ext[(-1)], c_ast.Decl))):
  return 'Not a valid declaration'
 return _explain_decl_node(node.ext[(-1)])

def explain_c_declaration ( c_decl ) : parser = c_parser . CParser ( ) try : node = parser . parse ( c_decl , filename = '<stdin>' ) except c_parser . ParseError : e = sys . exc_info ( ) [ 1 ] return ( 'Parse error:' + str ( e ) ) if ( ( not isinstance ( node , c_ast . FileAST ) ) or ( not isinstance ( node . ext [ ( - 1 ) ] , c_ast . Decl ) ) ) : return 'Not a valid declaration' return _explain_decl_node ( node . ext [ ( - 1 ) ] )
parses the declaration in c_decl and returns a text explanation as a string .