{"id":15557162,"url":"https://github.com/414owen/typedef-gen","last_synced_at":"2025-03-29T03:40:24.558Z","repository":{"id":131089493,"uuid":"122418684","full_name":"414owen/typedef-gen","owner":"414owen","description":"Alias all the types!","archived":false,"fork":false,"pushed_at":"2018-12-24T17:11:11.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-03T13:27:11.068Z","etag":null,"topics":["aliases","cpp","typedef"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/414owen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-22T02:03:58.000Z","updated_at":"2018-12-24T17:11:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"0e002862-3a16-4a24-aaab-13033e239eec","html_url":"https://github.com/414owen/typedef-gen","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/414owen%2Ftypedef-gen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/414owen%2Ftypedef-gen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/414owen%2Ftypedef-gen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/414owen%2Ftypedef-gen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/414owen","download_url":"https://codeload.github.com/414owen/typedef-gen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246135749,"owners_count":20729056,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aliases","cpp","typedef"],"created_at":"2024-10-02T15:16:21.883Z","updated_at":"2025-03-29T03:40:24.534Z","avatar_url":"https://github.com/414owen.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\t\u003cp\u003e\n\t   \u003cimg src=\"https://owen.cafe/typegen-anim.069ff0ce.svg\" height=\"150\"\u003e\n\t\u003c/p\u003e\n\t\u003ch1\u003eTypedef-Gen\u003c/h1\u003e\n\u003c/div\u003e\n\nGenerate typedefs programatically from a grammar file.\n\n## WARNING\n\nHUGELY EXPONENTIAL OUTPUT SIZE GROWTH. MAY FILL YOUR HARDDRIVE WITH TYPEDEFS IF\nYOU WRITE A BAD GRAMMAR FILE OR USE LOTS OF LAYERS.\n\n## Requirements\n\n* g++\n* make\n* boost\n\n## To build\n\n```\nmake\n```\n\n## To run\n\n```\n./alias [\u003clayers\u003e [\u003cin\u003e [\u003cout\u003e]]]\n\n# eg.\n./alias 2 grammar out\n# or\n./alias\n```\n\n## Sample output\n\n```\ntypedef std::vector\u003cchar\u003e vc;\ntypedef std::vector\u003cint\u003e vi;\ntypedef std::vector\u003clong long\u003e vll;\ntypedef std::map\u003cchar,char\u003e mcc;\ntypedef std::map\u003cint,char\u003e mic;\n\n...\n\ntypedef std::vector\u003cvc\u003e vvc;\ntypedef std::vector\u003cvi\u003e vvi;\ntypedef std::vector\u003cvll\u003e vvll;\n\n...\n\ntypedef std::map\u003cmci,vc\u003e mmcivc;\ntypedef std::map\u003cmii,vc\u003e mmiivc;\n\n...\n\nand so on, all the way down to those master of types:\n\ntypedef std::tuple\u003ctcllll,tllllll,tllllll\u003e ttclllltlllllltllllll;\ntypedef std::tuple\u003ctillll,tllllll,tllllll\u003e ttilllltlllllltllllll;\ntypedef std::tuple\u003ctllllll,tllllll,tllllll\u003e ttlllllltlllllltllllll;\n```\n\n## Notes\n\nNaming conflicts are possible, for example, with this grammar file:\n\n```\n#include \u003ctuple\u003e\n\nlong long -\u003e ll\nunsigned -\u003e u\nunsigned long long -\u003e ull\n\nstd::tuple\u003c2-3\u003e t\n```\n\n### tl;dr\n\nRename `u` or `ull` so `ull` doesn't start with the former.\n\n### Explanation\n\nThis is because `tullu` could mean `tuple\u003cunsigned long long, unsigned\u003e`, or\n`tuple\u003cunsigned, long long, unsigned\u003e` (notice the extra comma). The solution to\nthis is not to abbreviations that start with the whole of another abbreviation\n(in this exmaple `ull` starts with `u`) in grammars which generate\nmultiple-arity template arguments (tuple can have two or three parameters).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F414owen%2Ftypedef-gen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F414owen%2Ftypedef-gen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F414owen%2Ftypedef-gen/lists"}