{"action":"created","issue":{"url":"https://api.github.com/repos/inducer/pycparserext/issues/17","repository_url":"https://api.github.com/repos/inducer/pycparserext","labels_url":"https://api.github.com/repos/inducer/pycparserext/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/inducer/pycparserext/issues/17/comments","events_url":"https://api.github.com/repos/inducer/pycparserext/issues/17/events","html_url":"https://github.com/inducer/pycparserext/issues/17","id":145368773,"number":17,"title":"cannot attach attributes to nodes of type '<class 'pycparser.c_ast.PtrDecl'>'","user":{"login":"h4ck3rm1k3","id":34903,"avatar_url":"https://avatars.githubusercontent.com/u/34903?v=3","gravatar_id":"","url":"https://api.github.com/users/h4ck3rm1k3","html_url":"https://github.com/h4ck3rm1k3","followers_url":"https://api.github.com/users/h4ck3rm1k3/followers","following_url":"https://api.github.com/users/h4ck3rm1k3/following{/other_user}","gists_url":"https://api.github.com/users/h4ck3rm1k3/gists{/gist_id}","starred_url":"https://api.github.com/users/h4ck3rm1k3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/h4ck3rm1k3/subscriptions","organizations_url":"https://api.github.com/users/h4ck3rm1k3/orgs","repos_url":"https://api.github.com/users/h4ck3rm1k3/repos","events_url":"https://api.github.com/users/h4ck3rm1k3/events{/privacy}","received_events_url":"https://api.github.com/users/h4ck3rm1k3/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-04-02T12:29:37Z","updated_at":"2016-04-03T05:01:10Z","closed_at":null,"body":"typedef int wchar_t;\r\nextern wchar_t *wcscpy (wchar_t *__restrict __dest,\r\n   const wchar_t *__restrict __src) __attribute__ ((__nothrow__ , __leaf__));\r\n\r\n\r\n```\r\npython example.py test1.c\r\nWARNING: /usr/lib/python2.7/dist-packages/pycparser/plyparser.py:41: Rule 'initializer_list_opt' defined, but not used\r\nWARNING: There is 1 unused rule\r\nWARNING: Symbol 'initializer_list_opt' is unreachable\r\nTraceback (most recent call last):\r\n  File \"example.py\", line 12, in <module>\r\n    ast = p.parse(text)\r\n  File \"/home/jamesmikedupont/py/pycparserext/pycparserext/ext_c_parser.py\", line 64, in parse\r\n    return self.cparser.parse(text, lexer=self.clex, debug=debuglevel)\r\n  File \"/usr/lib/python2.7/dist-packages/ply/yacc.py\", line 269, in parse\r\n    return self.parseopt_notrack(input,lexer,debug,tracking,tokenfunc)\r\n  File \"/usr/lib/python2.7/dist-packages/ply/yacc.py\", line 975, in parseopt_notrack\r\n    p.callable(pslice)\r\n  File \"/home/jamesmikedupont/py/pycparserext/pycparserext/ext_c_parser.py\", line 282, in p_declarator_2\r\n    % type(p[1]))\r\nNotImplementedError: cannot attach attributes to nodes of type '<class 'pycparser.c_ast.PtrDecl'>'\r\n\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/inducer/pycparserext/issues/comments/204871637","html_url":"https://github.com/inducer/pycparserext/issues/17#issuecomment-204871637","issue_url":"https://api.github.com/repos/inducer/pycparserext/issues/17","id":204871637,"user":{"login":"vijunag","id":7487072,"avatar_url":"https://avatars.githubusercontent.com/u/7487072?v=3","gravatar_id":"","url":"https://api.github.com/users/vijunag","html_url":"https://github.com/vijunag","followers_url":"https://api.github.com/users/vijunag/followers","following_url":"https://api.github.com/users/vijunag/following{/other_user}","gists_url":"https://api.github.com/users/vijunag/gists{/gist_id}","starred_url":"https://api.github.com/users/vijunag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vijunag/subscriptions","organizations_url":"https://api.github.com/users/vijunag/orgs","repos_url":"https://api.github.com/users/vijunag/repos","events_url":"https://api.github.com/users/vijunag/events{/privacy}","received_events_url":"https://api.github.com/users/vijunag/received_events","type":"User","site_admin":false},"created_at":"2016-04-03T05:01:10Z","updated_at":"2016-04-03T05:01:10Z","body":"```\r\nPython 2.7.10 (default, Jul  5 2015, 14:15:43)\r\n[GCC 5.1.1 20150618 (Red Hat 5.1.1-4)] on linux2\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n>>> from pycparserext.ext_c_parser import GnuCParser\r\n>>> p = GnuCParser()\r\n>>> src=\"\"\"\r\n... typedef int wchar_t;\r\n... extern wchar_t *wcscpy (wchar_t *restrict __dest,\r\n... const wchar_t *__restrict __src) __attribute ((nothrow , leaf));\r\n...\r\n... \"\"\"\r\n>>> p.parse(src).show()\r\nFileAST:\r\n  Typedef: wchar_t, [], ['typedef']\r\n    TypeDecl: wchar_t, []\r\n      IdentifierType: ['int']\r\n  Decl: wcscpy, [], ['extern'], []\r\n    FuncDecl:\r\n      ParamList:\r\n        Decl: __dest, [], [], []\r\n          TypeDeclExt: __dest, []\r\n            IdentifierType: ['wchar_t']\r\n        Decl: __src, ['const'], [], []\r\n          TypeDeclExt: __src, ['const']\r\n            IdentifierType: ['wchar_t']\r\n      PtrDecl: []\r\n        TypeDeclExt: wcscpy, []\r\n          IdentifierType: ['wchar_t']\r\n>>> exit()\r\nlocalhost:~/clone3/pycparserext]$ git log\r\ncommit a5d7ef695aed6400fb1cacdfb40faea809d084e5\r\nAuthor: Vijay Nag <vijay@localhost.localdomain>\r\nDate:   Thu Mar 24 17:09:58 2016 +0530\r\n\r\n    Added support for empty GNU structures\r\n```\r\nThe latest master seems to be working fine for me. "}}