{"id":28958734,"url":"https://github.com/shaina-gh/token-seperation-using-files","last_synced_at":"2025-08-11T17:33:31.808Z","repository":{"id":294051368,"uuid":"985849976","full_name":"shaina-gh/token-seperation-using-files","owner":"shaina-gh","description":"A C++ program for lexical analysis that classifies tokens from source code using file input.","archived":false,"fork":false,"pushed_at":"2025-05-18T16:55:42.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-18T17:48:56.071Z","etag":null,"topics":["compiler-design","cpp","file","token-seperation"],"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/shaina-gh.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,"zenodo":null}},"created_at":"2025-05-18T16:48:57.000Z","updated_at":"2025-05-18T16:57:13.000Z","dependencies_parsed_at":"2025-05-18T17:59:08.056Z","dependency_job_id":null,"html_url":"https://github.com/shaina-gh/token-seperation-using-files","commit_stats":null,"previous_names":["shaina-gh/token-seperation-using-files"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shaina-gh/token-seperation-using-files","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaina-gh%2Ftoken-seperation-using-files","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaina-gh%2Ftoken-seperation-using-files/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaina-gh%2Ftoken-seperation-using-files/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaina-gh%2Ftoken-seperation-using-files/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shaina-gh","download_url":"https://codeload.github.com/shaina-gh/token-seperation-using-files/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaina-gh%2Ftoken-seperation-using-files/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261571512,"owners_count":23178768,"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":["compiler-design","cpp","file","token-seperation"],"created_at":"2025-06-23T23:06:37.206Z","updated_at":"2025-06-23T23:06:39.810Z","avatar_url":"https://github.com/shaina-gh.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Token Separation Using Files\n\n## 📌 Aim\n\nTo develop a C++ program that performs token separation from a given input using file handling. The program identifies and classifies tokens such as **separators**, **operators**, **constants**, and **identifiers** from the input file content.\n\n---\n\n## 🧠 Description\n\nThe main objective is to read input from a file, parse each line of text, and classify the tokens into one of the following categories:\n\n- **Separators**: Symbols such as `,`, `;`, `\u003c`, `\u003e`\n- **Operators**: Arithmetic and assignment symbols like `=`, `+`, `-`, `*`, `/`\n- **Constants**: Numeric values (`0` through `9`)\n- **Identifiers**: Any sequence of characters that does not belong to the above categories\n\nThe classification logic is implemented using vector-based lookups and simple parsing techniques.\n\n---\n\n## 🛠️ Technologies Used\n\n- Programming Language: **C++**\n- Concepts: **File Handling**, **Tokenization**, **Lexical Analysis**\n\n---\n\n## 📄 How It Works\n\n1. The program reads input from a file named `file.txt`.\n2. Each line is processed using the `check()` function.\n3. Characters in the line are evaluated to determine whether they are:\n   - **Separators**\n   - **Operators**\n   - **Constants**\n   - **Identifiers**\n4. Tokens are printed to the console with their corresponding classification.\n\n---\n\n## 📥 Input\n\nExample content of `file.txt`:\n\n```cpp\nint a = b + 5;\n```\n\n---\n\n## 📤 Expected Output\n\n```cpp\nIdentifier  int\nIdentifier  a\noperator    =\nIdentifier  b\noperator    +\nConstant    5\nseparator   ;\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshaina-gh%2Ftoken-seperation-using-files","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshaina-gh%2Ftoken-seperation-using-files","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshaina-gh%2Ftoken-seperation-using-files/lists"}