{"id":25633016,"url":"https://github.com/patowari/C-Compiler-Project-With-Pyhton","last_synced_at":"2026-06-15T05:30:17.927Z","repository":{"id":277065631,"uuid":"931221328","full_name":"mdzubayerhossain/C-Compiler-Project-With-Pyhton","owner":"mdzubayerhossain","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-11T23:14:15.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-12T00:22:41.759Z","etag":null,"topics":["ccompiler","compiler","pyhton"],"latest_commit_sha":null,"homepage":"","language":"Python","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/mdzubayerhossain.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":"2025-02-11T23:06:11.000Z","updated_at":"2025-02-11T23:48:53.000Z","dependencies_parsed_at":"2025-02-12T00:45:08.788Z","dependency_job_id":null,"html_url":"https://github.com/mdzubayerhossain/C-Compiler-Project-With-Pyhton","commit_stats":null,"previous_names":["mdzubayerhossain/c-compiler-project-with-pyhton"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdzubayerhossain%2FC-Compiler-Project-With-Pyhton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdzubayerhossain%2FC-Compiler-Project-With-Pyhton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdzubayerhossain%2FC-Compiler-Project-With-Pyhton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdzubayerhossain%2FC-Compiler-Project-With-Pyhton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mdzubayerhossain","download_url":"https://codeload.github.com/mdzubayerhossain/C-Compiler-Project-With-Pyhton/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240237305,"owners_count":19769742,"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":["ccompiler","compiler","pyhton"],"created_at":"2025-02-22T21:19:44.971Z","updated_at":"2026-06-15T05:30:17.889Z","avatar_url":"https://github.com/mdzubayerhossain.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple C Compiler\n\nA Python implementation of a compiler pipeline for a subset of the C programming language.\n\n## Features\n\n- Full compiler pipeline implementation:\n  1. Lexical Analysis (Tokenizer)\n  2. Syntax Analysis (Parser)\n  3. Semantic Analysis\n  4. Intermediate Code Generation\n  5. Code Optimization\n  6. Target Code Generation\n\n- Supported C constructs:\n  - Variable declarations\n  - Arithmetic operations\n  - Function definitions\n  - Return statements\n\n## Requirements\n\n- Python 3.6+\n\n## Quick Start\n\n1. Clone repository:\n    ```bash\n    https://github.com/mdzubayerhossain/C-Compiler-Project-With-Pyhton.git\n    cd C-Compiler-Project-With-Pyhton\n# Create test file test.c\n    ``bash\n    int main() {\n    int result = 2 + 3 * 4;\n    return result;\n    }\n# Example Output\n   ``bash\n\n\n    global main\n    main:\n    mov t1, 3\n    mov t2, 4\n    mul t1, t2\n    mov t3, 2\n    add t3, t1\n    mov result, t3\n    mov eax, result\n    ret  \n\n' =============================================\n' COMPILER COMPONENTS\n' =============================================\n\nPublic Module CompilerComponents\n\n# Region \"Lexical Analysis\"\n    ' -----------------------------------------\n    ' Lexical Analysis Module\n    ' -----------------------------------------\n    ' Tokenizes input using regular expressions\n    ' Identifies:\n    '   - Keywords (e.g., \"int\", \"return\")\n    '   - Identifiers (variable names)\n    '   - Literals (numeric values)\n    '   - Symbols (operators and punctuation)\n\n# Region \"Syntax Analysis\"\n    ' -----------------------------------------\n    ' Syntax Analysis Module\n    ' -----------------------------------------\n    ' Implements recursive descent parser\n    ' Constructs Abstract Syntax Tree (AST):\n    '   - Node-based hierarchy\n    '   - Represents program structure\n    '   - Validates grammar rules\n\n\n# Region \"Intermediate Representation\"\n    ' -----------------------------------------\n    ' Intermediate Code Generation\n    ' -----------------------------------------\n    ' Generates Three-Address Code (TAC):\n    '   - Temporary variables\n    '   - Simple operations\n    ' Performs optimizations:\n    '   - Constant folding\n    '   - Dead code elimination\n\n\n# Region \"Target Generation\"\n    ' -----------------------------------------\n    ' Target Code Generation\n    ' -----------------------------------------\n    ' Outputs x86 assembly code with:\n    '   - Basic instructions (MOV, ADD, etc.)\n    '   - Register allocation strategy\n    '   - Stack management\n    ' Generates:\n    '   - Section headers\n    '   - Function prologues/epilogues\n\n\n# Region \"Limitations\"\n    ' -----------------------------------------\n    ' Current System Limitations\n    ' -----------------------------------------\n    Const LIMITATIONS As String() = {\n        \"Supports limited C syntax subset\",\n        \"No advanced type checking\",\n        \"Simplified memory management\",\n        \"Basic error handling\",\n        \"Limited optimization passes\",\n        \"No support for pointers\"\n    }\n\n\nThis README:\n1. Provides clear usage instructions\n2. Shows sample input/output\n3. Includes architecture visualization\n4. Lists key components and limitations\n5. Uses proper markdown formatting\n\nWould you like me to modify any section or add specific details?\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatowari%2FC-Compiler-Project-With-Pyhton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatowari%2FC-Compiler-Project-With-Pyhton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatowari%2FC-Compiler-Project-With-Pyhton/lists"}