{"id":21206169,"url":"https://github.com/otmanedaoudi/c-complex-declarations-parser","last_synced_at":"2025-10-08T07:37:58.999Z","repository":{"id":158959843,"uuid":"561412486","full_name":"OtmaneDaoudi/C-complex-declarations-parser","owner":"OtmaneDaoudi","description":"A program that converts a complex C declaration into a human readable representation.","archived":false,"fork":false,"pushed_at":"2024-08-23T11:55:07.000Z","size":1934,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-21T00:32:28.510Z","etag":null,"topics":["c","compiler-design","syntax-analysis","syntax-tree"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OtmaneDaoudi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2022-11-03T16:25:23.000Z","updated_at":"2025-02-06T09:26:45.000Z","dependencies_parsed_at":"2024-08-23T12:58:13.055Z","dependency_job_id":"b418dc64-e33c-4085-8b16-0bf7bd755c78","html_url":"https://github.com/OtmaneDaoudi/C-complex-declarations-parser","commit_stats":null,"previous_names":["otmanedaoudi/c-complex-declarations-parser"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/OtmaneDaoudi/C-complex-declarations-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OtmaneDaoudi%2FC-complex-declarations-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OtmaneDaoudi%2FC-complex-declarations-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OtmaneDaoudi%2FC-complex-declarations-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OtmaneDaoudi%2FC-complex-declarations-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OtmaneDaoudi","download_url":"https://codeload.github.com/OtmaneDaoudi/C-complex-declarations-parser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OtmaneDaoudi%2FC-complex-declarations-parser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278909714,"owners_count":26066887,"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","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["c","compiler-design","syntax-analysis","syntax-tree"],"created_at":"2024-11-20T20:54:26.108Z","updated_at":"2025-10-08T07:37:58.994Z","avatar_url":"https://github.com/OtmaneDaoudi.png","language":"C","readme":"This is an exercise from the book: [The ANSI C Programming Language](https://www.amazon.com/Programming-Language-2nd-Brian-Kernighan/dp/0131103628), but with a more advanced implementation.\n\nI extended the grammar by eliminating left recursivity and applying left factoring.\n# Grammar:\n```\ndcl     ==\u003e A dirdcl\nA       ==\u003e * A | epsilon\ndirdcl  ==\u003e id dirdcl1 | ( dcl ) dirdcl1\ndirdcl1 ==\u003e ( ) dirdcl1 | [ dirdcl2 | epsilon\ndirdcl2 ==\u003e ] dirdcl1 | number ] dirdcl1\n\n```\n# LL(1) table:\n|   | * | ( | ) | [ | ] | number | id | $ | \n| --- | --- | --- | --- | --- | --- | --- | --- | --- |\n| dcl | dcl ==\u003e A dirdcl | dcl ==\u003e A dirdcl |  |  |  |  | dcl ==\u003e A dirdcl |  |\n| A | A ==\u003e * A | A ==\u003e epsilon |  |  |  |  | A ==\u003e epsilon |  |\n| dirdcl  |  | dirdcl ==\u003e ( dcl ) dirdcl1 |  |  |  |  | dirdcl ==\u003e id dirdcl1 |  |\n| dirdcl1  |  | dirdcl1 ==\u003e ( ) dirdcl1 | dirdcl1 ==\u003e epsilon | dirdcl1 ==\u003e [ dirdcl2 |  |  | | dirdcl1 ==\u003e epsilon |\n| dirdcl2  | |  |  |  | dirdcl2 ==\u003e ] dirdcl1 | dirdcl2 ==\u003e number ] dirdcl1 |  |  |\n\n# Notes:\n- The program only supports identifiers with one character.\u003cbr /\u003e\n- Supports one-digit array lengths.\u003cbr /\u003e\n- No support for function args.\u003cbr /\u003e\n- No support for constants declaration.\u003cbr /\u003e\n\n# Examples:\n![examples](https://user-images.githubusercontent.com/63020343/201544807-5da66464-ce43-4afc-87b6-eecb0c3550ca.png)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fotmanedaoudi%2Fc-complex-declarations-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fotmanedaoudi%2Fc-complex-declarations-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fotmanedaoudi%2Fc-complex-declarations-parser/lists"}