{"action":"created","comment":{"url":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/pulls/comments/32900077","id":32900077,"diff_hunk":"@@ -1694,24 +1274,26 @@ def _init_cparser(extra_types=None, extra_modifiers=None):\n              Word(alphas + \"_\", alphanums + \"_$\") +\n              WordEnd(wordchars)).setParseAction(lambda t: t[0])\n \n-    call_conv = Optional(Keyword('__cdecl') |\n-                         Keyword('__stdcall'))('call_conv')\n-\n     # Removes '__name' from all type specs. may cause trouble.\n     underscore_2_ident = (WordStart(wordchars) + ~keyword + '__' +\n                           Word(alphanums, alphanums+\"_$\") +\n-                          WordEnd(wordchars)).setParseAction(lambda t: t[0])\n-    type_qualifier = ZeroOrMore((underscore_2_ident + Optional(nestedExpr())) |\n-                                kwl(qualifiers))\n-\n-    storage_class_spec = Optional(kwl(storage_classes))\n+                          WordEnd(wordchars)\n+                          )\n \n+    special_quals = underscore_2_ident   ###TODO: remove / has to be done via extra_modifiers in future","path":"pyclibrary/c_parser.py","position":1270,"original_position":1279,"commit_id":"502716deca6cb58bedcd1658dffd8f73d17daa64","original_commit_id":"d4d120297888726723f073c4880c31257ff1481e","user":{"login":"mrh1997","id":1482077,"avatar_url":"https://avatars.githubusercontent.com/u/1482077?v=3","gravatar_id":"","url":"https://api.github.com/users/mrh1997","html_url":"https://github.com/mrh1997","followers_url":"https://api.github.com/users/mrh1997/followers","following_url":"https://api.github.com/users/mrh1997/following{/other_user}","gists_url":"https://api.github.com/users/mrh1997/gists{/gist_id}","starred_url":"https://api.github.com/users/mrh1997/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrh1997/subscriptions","organizations_url":"https://api.github.com/users/mrh1997/orgs","repos_url":"https://api.github.com/users/mrh1997/repos","events_url":"https://api.github.com/users/mrh1997/events{/privacy}","received_events_url":"https://api.github.com/users/mrh1997/received_events","type":"User","site_admin":false},"body":"Currently the parser accepts **all** names that begin with '__' as type qualifiers plus some hard coded type qualifiers (i.e. 'const', 'volatile', ...)\r\nBut as we plan to provide compiler specific parsers the parser could know exactly the list of type qualifiers to accept.\r\n\r\nThis means we could replace this generic type qual detector (all words starting with '__' are typequals), by a compiler specific one (all words passed to the Parsers constructur are typequals).","created_at":"2015-06-22T00:26:41Z","updated_at":"2015-06-22T00:26:41Z","html_url":"https://github.com/MatthieuDartiailh/pyclibrary/pull/14#discussion_r32900077","pull_request_url":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/pulls/14","_links":{"self":{"href":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/pulls/comments/32900077"},"html":{"href":"https://github.com/MatthieuDartiailh/pyclibrary/pull/14#discussion_r32900077"},"pull_request":{"href":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/pulls/14","id":38151236,"html_url":"https://github.com/MatthieuDartiailh/pyclibrary/pull/14","diff_url":"https://github.com/MatthieuDartiailh/pyclibrary/pull/14.diff","patch_url":"https://github.com/MatthieuDartiailh/pyclibrary/pull/14.patch","issue_url":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/issues/14","number":14,"state":"open","locked":false,"title":"Integration of CLibInterface into CParser","user":{"login":"mrh1997","id":1482077,"avatar_url":"https://avatars.githubusercontent.com/u/1482077?v=3","gravatar_id":"","url":"https://api.github.com/users/mrh1997","html_url":"https://github.com/mrh1997","followers_url":"https://api.github.com/users/mrh1997/followers","following_url":"https://api.github.com/users/mrh1997/following{/other_user}","gists_url":"https://api.github.com/users/mrh1997/gists{/gist_id}","starred_url":"https://api.github.com/users/mrh1997/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrh1997/subscriptions","organizations_url":"https://api.github.com/users/mrh1997/orgs","repos_url":"https://api.github.com/users/mrh1997/repos","events_url":"https://api.github.com/users/mrh1997/events{/privacy}","received_events_url":"https://api.github.com/users/mrh1997/received_events","type":"User","site_admin":false},"body":"CParser() outputs now a CLibInterface() object instead of the ```parser.defs``` and ```parser.file_defs``` dictionaries (as discussed in #11). \r\n\r\nAs part of this integration some changes of the public interfaces of CParser/CLibInterface was required:\r\n* CParser:\r\n   - ```copy_from``` parameter requires a CLibInterface instead one or more other\r\n     CParsers now (if multiple CParser shall be used as source,\r\n     the CLibInterfaces can be merged via CLibInterface.include)\r\n   - ```kwargs``` parameter: accepts only ValMacros now. This corresponds to the behaviour of C-compilers where only macros can be defined via command line (\"-D\" option). All other usecases can be done by ```copy_from``` parameter\r\n   - removed some functions/attributes that relates to ```.defs``` macro. Most of them are either handled by CLibInterace (i.e. print_all()) or can be easily implemented as a one-liner (```CParser.find``` function can be easily replaced by\r\n     ```[filename for name, filename in clib_intf.file_map if re.match(name, ...)]```)\r\n* slightly modified ```c_model.py```\r\n   - more fine grained Inheritance Tree\r\n   - final Macro class interface (split macros into ValMacro and FnMacro with common Macro class)\r\n   - CLibInterface got some functionality from CParser\r\n   - introduced ```CLibInterface.include()``` to merge multiple interfaces into a single one\r\n   - moved error classes to .error Module\r\n   - added __iter__() to get all subtypes of type\r\n\r\nFurthermore two features were introduced as part of the integration:\r\n * anonymous enums/structs/unions do not use artifical names any more but refer\r\n  to the corresponding StructType/UnionType/EnumType directly (avoids name\r\n  conflicts when user uses the same name as the autogenerated one or when\r\n  two clibinterfaces with anonymous structures are merged via\r\n  clibinterface.include()) (see 6974340a5b0bdeb57217dc113f94e564096f29e8)\r\n * added storage class support (see 72f5a4dd1fec6f671169a223f2088b0cdf59b481)","created_at":"2015-06-19T21:49:50Z","updated_at":"2015-06-22T00:26:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"993c021367daafda4f587447900637dd39eb27f0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/pulls/14/commits","review_comments_url":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/pulls/14/comments","review_comment_url":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/issues/14/comments","statuses_url":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/statuses/502716deca6cb58bedcd1658dffd8f73d17daa64","head":{"label":"mrh1997:cmodel-based-parser","ref":"cmodel-based-parser","sha":"502716deca6cb58bedcd1658dffd8f73d17daa64","user":{"login":"mrh1997","id":1482077,"avatar_url":"https://avatars.githubusercontent.com/u/1482077?v=3","gravatar_id":"","url":"https://api.github.com/users/mrh1997","html_url":"https://github.com/mrh1997","followers_url":"https://api.github.com/users/mrh1997/followers","following_url":"https://api.github.com/users/mrh1997/following{/other_user}","gists_url":"https://api.github.com/users/mrh1997/gists{/gist_id}","starred_url":"https://api.github.com/users/mrh1997/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrh1997/subscriptions","organizations_url":"https://api.github.com/users/mrh1997/orgs","repos_url":"https://api.github.com/users/mrh1997/repos","events_url":"https://api.github.com/users/mrh1997/events{/privacy}","received_events_url":"https://api.github.com/users/mrh1997/received_events","type":"User","site_admin":false},"repo":{"id":36191757,"name":"pyclibrary","full_name":"mrh1997/pyclibrary","owner":{"login":"mrh1997","id":1482077,"avatar_url":"https://avatars.githubusercontent.com/u/1482077?v=3","gravatar_id":"","url":"https://api.github.com/users/mrh1997","html_url":"https://github.com/mrh1997","followers_url":"https://api.github.com/users/mrh1997/followers","following_url":"https://api.github.com/users/mrh1997/following{/other_user}","gists_url":"https://api.github.com/users/mrh1997/gists{/gist_id}","starred_url":"https://api.github.com/users/mrh1997/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrh1997/subscriptions","organizations_url":"https://api.github.com/users/mrh1997/orgs","repos_url":"https://api.github.com/users/mrh1997/repos","events_url":"https://api.github.com/users/mrh1997/events{/privacy}","received_events_url":"https://api.github.com/users/mrh1997/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mrh1997/pyclibrary","description":"C parser and ctypes automation for python","fork":true,"url":"https://api.github.com/repos/mrh1997/pyclibrary","forks_url":"https://api.github.com/repos/mrh1997/pyclibrary/forks","keys_url":"https://api.github.com/repos/mrh1997/pyclibrary/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mrh1997/pyclibrary/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mrh1997/pyclibrary/teams","hooks_url":"https://api.github.com/repos/mrh1997/pyclibrary/hooks","issue_events_url":"https://api.github.com/repos/mrh1997/pyclibrary/issues/events{/number}","events_url":"https://api.github.com/repos/mrh1997/pyclibrary/events","assignees_url":"https://api.github.com/repos/mrh1997/pyclibrary/assignees{/user}","branches_url":"https://api.github.com/repos/mrh1997/pyclibrary/branches{/branch}","tags_url":"https://api.github.com/repos/mrh1997/pyclibrary/tags","blobs_url":"https://api.github.com/repos/mrh1997/pyclibrary/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mrh1997/pyclibrary/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mrh1997/pyclibrary/git/refs{/sha}","trees_url":"https://api.github.com/repos/mrh1997/pyclibrary/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mrh1997/pyclibrary/statuses/{sha}","languages_url":"https://api.github.com/repos/mrh1997/pyclibrary/languages","stargazers_url":"https://api.github.com/repos/mrh1997/pyclibrary/stargazers","contributors_url":"https://api.github.com/repos/mrh1997/pyclibrary/contributors","subscribers_url":"https://api.github.com/repos/mrh1997/pyclibrary/subscribers","subscription_url":"https://api.github.com/repos/mrh1997/pyclibrary/subscription","commits_url":"https://api.github.com/repos/mrh1997/pyclibrary/commits{/sha}","git_commits_url":"https://api.github.com/repos/mrh1997/pyclibrary/git/commits{/sha}","comments_url":"https://api.github.com/repos/mrh1997/pyclibrary/comments{/number}","issue_comment_url":"https://api.github.com/repos/mrh1997/pyclibrary/issues/comments{/number}","contents_url":"https://api.github.com/repos/mrh1997/pyclibrary/contents/{+path}","compare_url":"https://api.github.com/repos/mrh1997/pyclibrary/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mrh1997/pyclibrary/merges","archive_url":"https://api.github.com/repos/mrh1997/pyclibrary/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mrh1997/pyclibrary/downloads","issues_url":"https://api.github.com/repos/mrh1997/pyclibrary/issues{/number}","pulls_url":"https://api.github.com/repos/mrh1997/pyclibrary/pulls{/number}","milestones_url":"https://api.github.com/repos/mrh1997/pyclibrary/milestones{/number}","notifications_url":"https://api.github.com/repos/mrh1997/pyclibrary/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mrh1997/pyclibrary/labels{/name}","releases_url":"https://api.github.com/repos/mrh1997/pyclibrary/releases{/id}","created_at":"2015-05-24T20:31:53Z","updated_at":"2015-05-24T20:31:54Z","pushed_at":"2015-06-22T00:15:09Z","git_url":"git://github.com/mrh1997/pyclibrary.git","ssh_url":"git@github.com:mrh1997/pyclibrary.git","clone_url":"https://github.com/mrh1997/pyclibrary.git","svn_url":"https://github.com/mrh1997/pyclibrary","homepage":"http://pyclibrary.readthedocs.org","size":1295,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"MatthieuDartiailh:parser-rework","ref":"parser-rework","sha":"d48f5d7869dceb6403f9a810363c85d441af0a87","user":{"login":"MatthieuDartiailh","id":4481740,"avatar_url":"https://avatars.githubusercontent.com/u/4481740?v=3","gravatar_id":"","url":"https://api.github.com/users/MatthieuDartiailh","html_url":"https://github.com/MatthieuDartiailh","followers_url":"https://api.github.com/users/MatthieuDartiailh/followers","following_url":"https://api.github.com/users/MatthieuDartiailh/following{/other_user}","gists_url":"https://api.github.com/users/MatthieuDartiailh/gists{/gist_id}","starred_url":"https://api.github.com/users/MatthieuDartiailh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatthieuDartiailh/subscriptions","organizations_url":"https://api.github.com/users/MatthieuDartiailh/orgs","repos_url":"https://api.github.com/users/MatthieuDartiailh/repos","events_url":"https://api.github.com/users/MatthieuDartiailh/events{/privacy}","received_events_url":"https://api.github.com/users/MatthieuDartiailh/received_events","type":"User","site_admin":false},"repo":{"id":29362772,"name":"pyclibrary","full_name":"MatthieuDartiailh/pyclibrary","owner":{"login":"MatthieuDartiailh","id":4481740,"avatar_url":"https://avatars.githubusercontent.com/u/4481740?v=3","gravatar_id":"","url":"https://api.github.com/users/MatthieuDartiailh","html_url":"https://github.com/MatthieuDartiailh","followers_url":"https://api.github.com/users/MatthieuDartiailh/followers","following_url":"https://api.github.com/users/MatthieuDartiailh/following{/other_user}","gists_url":"https://api.github.com/users/MatthieuDartiailh/gists{/gist_id}","starred_url":"https://api.github.com/users/MatthieuDartiailh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatthieuDartiailh/subscriptions","organizations_url":"https://api.github.com/users/MatthieuDartiailh/orgs","repos_url":"https://api.github.com/users/MatthieuDartiailh/repos","events_url":"https://api.github.com/users/MatthieuDartiailh/events{/privacy}","received_events_url":"https://api.github.com/users/MatthieuDartiailh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MatthieuDartiailh/pyclibrary","description":"C parser and ctypes automation for python","fork":false,"url":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary","forks_url":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/forks","keys_url":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/teams","hooks_url":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/hooks","issue_events_url":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/issues/events{/number}","events_url":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/events","assignees_url":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/assignees{/user}","branches_url":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/branches{/branch}","tags_url":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/tags","blobs_url":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/git/refs{/sha}","trees_url":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/statuses/{sha}","languages_url":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/languages","stargazers_url":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/stargazers","contributors_url":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/contributors","subscribers_url":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/subscribers","subscription_url":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/subscription","commits_url":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/commits{/sha}","git_commits_url":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/git/commits{/sha}","comments_url":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/comments{/number}","issue_comment_url":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/issues/comments{/number}","contents_url":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/contents/{+path}","compare_url":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/merges","archive_url":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/downloads","issues_url":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/issues{/number}","pulls_url":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/pulls{/number}","milestones_url":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/milestones{/number}","notifications_url":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/labels{/name}","releases_url":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/releases{/id}","created_at":"2015-01-16T18:53:53Z","updated_at":"2015-06-19T14:34:15Z","pushed_at":"2015-06-22T00:15:10Z","git_url":"git://github.com/MatthieuDartiailh/pyclibrary.git","ssh_url":"git@github.com:MatthieuDartiailh/pyclibrary.git","clone_url":"https://github.com/MatthieuDartiailh/pyclibrary.git","svn_url":"https://github.com/MatthieuDartiailh/pyclibrary","homepage":"http://pyclibrary.readthedocs.org","size":1417,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":4,"forks":3,"open_issues":4,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/pulls/14"},"html":{"href":"https://github.com/MatthieuDartiailh/pyclibrary/pull/14"},"issue":{"href":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/issues/14"},"comments":{"href":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/MatthieuDartiailh/pyclibrary/statuses/502716deca6cb58bedcd1658dffd8f73d17daa64"}}}}