{"id":26871577,"url":"https://github.com/iaceene/minishell-parser","last_synced_at":"2026-05-06T17:33:53.865Z","repository":{"id":283912756,"uuid":"951642871","full_name":"iaceene/Minishell-Parser","owner":"iaceene","description":"This repository contains the parsing module for a custom Minishell implementation in C. The parser processes user input, tokenizes commands, handles operators (pipes, redirections, etc.), and structures the data for execution. Designed to be efficient and modular, this parser serves as the foundation for command execution in a shell environment.","archived":false,"fork":false,"pushed_at":"2025-05-12T23:11:23.000Z","size":2855,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-13T00:19:13.593Z","etag":null,"topics":["42minishell","42project","42school","bash","bash-parser","c-programming","command-line","custom-shell","minishell","minishell-42","minishell-project","shell","shell-interpreter","shell-scripting","terminal","unix-shell"],"latest_commit_sha":null,"homepage":"http://yaajagro.tech","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iaceene.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-20T02:28:08.000Z","updated_at":"2025-05-12T23:11:26.000Z","dependencies_parsed_at":"2025-03-23T01:29:10.066Z","dependency_job_id":"72a3aacd-d4f9-4e49-8b74-8b57482f8aa0","html_url":"https://github.com/iaceene/Minishell-Parser","commit_stats":null,"previous_names":["iaceene/minishell-parser"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/iaceene/Minishell-Parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iaceene%2FMinishell-Parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iaceene%2FMinishell-Parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iaceene%2FMinishell-Parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iaceene%2FMinishell-Parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iaceene","download_url":"https://codeload.github.com/iaceene/Minishell-Parser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iaceene%2FMinishell-Parser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273082431,"owners_count":25042282,"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-09-01T02:00:09.058Z","response_time":120,"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":["42minishell","42project","42school","bash","bash-parser","c-programming","command-line","custom-shell","minishell","minishell-42","minishell-project","shell","shell-interpreter","shell-scripting","terminal","unix-shell"],"created_at":"2025-03-31T07:20:08.444Z","updated_at":"2026-05-06T17:33:53.825Z","avatar_url":"https://github.com/iaceene.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🐚 Minishell Parser\n\n![Alt Text](/img/minishell.jpg)\n\n## 📌 Overview  \nThis repository contains the **parsing module** for a custom **Minishell** implementation in C. The parser is responsible for:  \n🔹 **Lexical analysis** – Tokenizing user input into meaningful components.  \n🔹 **Syntax validation** – Ensuring correct command structure and detecting errors.  \n🔹 **Expansion handling** – Processing environment variables and special characters.  \n🔹 **Command structuring** – Organizing parsed data for execution.  \n\n## Project Structure\n```\ncomponents/parser/\n├── expander/\n│   ├── expander.c\n│   ├── expander_utiles.c\n│   ├── expander_utiles_tree.c\n│   ├── expander_utiles_two.c\n│   ├── handlers.c\n├── herdoc/\n│   ├── herdoc.c\n│   ├── herdoc_utile_one.c\n├── init/\n│   ├── parser.c\n│   ├── parser_utiles.c\n├── lexer/\n│   ├── final_step.c\n│   ├── lexer.c\n│   ├── lexer_utiles.c\n│   ├── syntax_checker.c\n│   ├── syntax_utiles.c\n│   ├── syntax_utiles_two.c\n├── prompt/\n│   ├── get_cli.c\n│   ├── prompt.c\n│   ├── prompt_utiles.c\n└── parser.h\n```\n\n## ✨ Features  \n✅ Tokenizes shell commands into structured data.  \n✅ Supports pipes (`|`), redirections (`\u003e`, `\u003c`), and heredocs (`\u003c\u003c`).  \n✅ Handles **single** (`'`) and **double** (`\"`) quotes correctly.  \n✅ Expands **environment variables** (`$VAR`).  \n✅ Validates syntax before execution.  \n\n# Minishell Parser\n\n\n## Features\n- **Lexical Analysis**: Tokenizes input commands.\n- **Syntax Checking**: Validates command structures.\n- **Expansion**: Handles variables, wildcards, and heredoc.\n- **Command Parsing**: Builds AST-like structures for execution.\n- **Redirections \u0026 Pipes**: Parses input/output redirections and command pipelines.\n\n## Installation \u0026 Usage\n```sh\ngit clone https://github.com/iaceene/Minishell-Parser.git\ncd Minishell-Parser\n# if you are using Mac\n./Parser_Mac\n# if you are using Linux\n./Parser_Linux\n```\n\n## Example Commands \u0026 Parsing Output\n```\nyaajagro@e1r7p7 $ ls -la\nCOMMAND --\u003e [ls] ARG [-la]\n\nyaajagro@e1r7p7 $ ls | ls -la | cat -e | grep $USER\nCOMMAND --\u003e [ls] \nPIPED TO\nCOMMAND --\u003e [ls] ARG [-la]\nPIPED TO\nCOMMAND --\u003e [cat] ARG [-e]\nPIPED TO\nCOMMAND --\u003e [grep] ARG [yaajagro]\n\nyaajagro@e1r7p7 $ ls \u003e file1 \u003c file2 \u003e\u003e appFile\nCOMMAND --\u003e [ls] \nOUTFILE [file1]\nINFILE [file2]\nAPPEND [appFile]\n\nyaajagro@e1r7p7 $ \u003c\u003c eof cat -e | ls -la\n\u003e this heredoc\n\u003e eof\nCOMMAND --\u003e [cat] ARG [-e]\nHERDOC fd [4] content [this heredoc]\nCOMMAND --\u003e [ls] ARG [-la]\n```\n\n## 👤 Author  \nDeveloped by **[Yassine Ajagrou](https://github.com/iaceene)**, For the source code or questions, [Send me an email](mailto:yassineajagrou986@gmail.com?subject=Hello%20Yassine%2C%20I%20want%20the%20source%20code%2C%20how%20can%20I%20get%20it%3F\u0026body=Hello%20Yassine%2C%20I%20want%20the%20source%20code%2C%20how%20can%20I%20get%20it%3F)\n\n. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiaceene%2Fminishell-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiaceene%2Fminishell-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiaceene%2Fminishell-parser/lists"}