{"id":19984127,"url":"https://github.com/arya2004/compiler-design","last_synced_at":"2026-03-19T12:57:43.343Z","repository":{"id":250112385,"uuid":"833503101","full_name":"arya2004/compiler-design","owner":"arya2004","description":"Compiler Design Uni Lab Course Codes in Lex and Yacc","archived":false,"fork":false,"pushed_at":"2024-10-11T18:21:43.000Z","size":93,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-01T20:17:21.463Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Lex","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arya2004.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2024-07-25T07:28:44.000Z","updated_at":"2024-11-15T20:47:30.000Z","dependencies_parsed_at":"2024-08-29T09:07:18.339Z","dependency_job_id":null,"html_url":"https://github.com/arya2004/compiler-design","commit_stats":null,"previous_names":["arya2004/compiler_design"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/arya2004/compiler-design","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arya2004%2Fcompiler-design","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arya2004%2Fcompiler-design/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arya2004%2Fcompiler-design/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arya2004%2Fcompiler-design/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arya2004","download_url":"https://codeload.github.com/arya2004/compiler-design/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arya2004%2Fcompiler-design/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30106163,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T01:39:18.192Z","status":"online","status_checked_at":"2026-03-05T02:00:06.710Z","response_time":93,"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":["hacktoberfest"],"created_at":"2024-11-13T04:17:36.876Z","updated_at":"2026-03-05T02:04:05.772Z","avatar_url":"https://github.com/arya2004.png","language":"Lex","readme":"# Compiler Design Uni Lab Course Codes in Lex\n\nThis repository contains the laboratory course codes for the Compiler Design course using Lex. The codes are designed to illustrate various concepts in compiler design, including lexical analysis, token generation, pattern matching, and more.\n\n\n\n## Prerequisites\n\nBefore running any Lex program, ensure you have the following installed:\n\n- **Flex**: Fast Lexical Analyzer Generator\n- **GCC**: GNU Compiler Collection (for compiling the generated C code)\n\n## Installation\n\n1. **Install Flex**:\n    - On Ubuntu: `sudo apt-get install flex`\n    - On macOS: `brew install flex`\n\n2. **Install GCC**:\n    - On Ubuntu: `sudo apt-get install gcc`\n    - On macOS: `brew install gcc`\n\n## How to Use and Run Lex Programs\n\n1. **Write or Edit the Lex file** (e.g., `lab1.l`) to define the patterns and actions.\n\n2. **Generate the C file** from the Lex file using Flex:\n    ```bash\n    flex lab1.l\n    ```\n\n    This will produce a file named `lex.yy.c`.\n\n3. **Compile the generated C file** using GCC:\n    ```bash\n    gcc lex.yy.c -o lab1\n    ```\n\n    This will produce an executable named `lab1`.\n\n4. **Run the executable**:\n    ```bash\n    ./lab1 \u003c input.txt\n    ```\n\n    Replace `input.txt` with the name of the file you want to process, or provide input directly if the program reads from standard input.\n\n\n## Contributing\n\nIf you have any improvements or additional lab exercises to contribute, please fork this repository, make your changes, and submit a pull request.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## Contact\n\nFor any queries or issues, please create an issue in this repository or contact the course instructor.\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farya2004%2Fcompiler-design","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farya2004%2Fcompiler-design","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farya2004%2Fcompiler-design/lists"}