{"id":25451492,"url":"https://github.com/pvskand/mini-c","last_synced_at":"2025-05-16T11:07:47.057Z","repository":{"id":137223498,"uuid":"89172383","full_name":"pvskand/mini-c","owner":"pvskand","description":"An implementation of mini-c (basic features of C programming).","archived":false,"fork":false,"pushed_at":"2017-04-30T17:52:09.000Z","size":33,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-17T22:54:50.999Z","etag":null,"topics":["course-project","coursework","mini-compiler"],"latest_commit_sha":null,"homepage":null,"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/pvskand.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":"2017-04-23T21:03:10.000Z","updated_at":"2017-04-23T21:30:54.000Z","dependencies_parsed_at":"2024-03-30T20:31:09.976Z","dependency_job_id":null,"html_url":"https://github.com/pvskand/mini-c","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvskand%2Fmini-c","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvskand%2Fmini-c/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvskand%2Fmini-c/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvskand%2Fmini-c/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pvskand","download_url":"https://codeload.github.com/pvskand/mini-c/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254518369,"owners_count":22084374,"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":["course-project","coursework","mini-compiler"],"created_at":"2025-02-17T22:53:42.459Z","updated_at":"2025-05-16T11:07:46.984Z","avatar_url":"https://github.com/pvskand.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Codacy Badge](https://api.codacy.com/project/badge/Grade/4a53f12f18324c6282446fba2e9e1554)](https://www.codacy.com?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=pvskand/mini-c\u0026amp;utm_campaign=Badge_Grade)\n\n# Team Members:\n1) Aakarshan Gupta \n2) Himanshu Tolani \n3) Jatin Garg \n4) Saumya Goyal \n5) Skand Vishwanath Peri \n----------------------------------------------------------------------------------------------------------------------------------\n\n# Description of Program:\n\nThis program takes in basic C text file as an input (input to be given in input.txt) and simulates that C program and results the output.\n\n\n----------------------------------------------------------------------------------------------------------------------------------\n\n# Syntax:\n##### Variable assignment:\n`a = 5;` \u003cbr\u003e\n`a[1] = 5l` \u003cbr\u003e\n`a = b;` [`b` is previously assigned, else will give an error] \u003cbr\u003e\n\n##### While Loop:\n```\nwhile( Condition )\n{\n  Statement;\n};\n```\n*Note* : There is a `;` after the `while loop` closing curly braces. \u003cbr\u003e\n\n##### Operations :\n\nOperations are similar to that in `C` language: \u003cbr\u003e\n\n###### Addition:\n`a = a + 1;` \u003cbr\u003e\n`a = b + c;`\u003cbr\u003e\n`a = 5 + 3;`\u003cbr\u003e\n###### Subtraction:\n`a = a - 1;` \u003cbr\u003e\n`a = b - c;`\u003cbr\u003e\n`a = 5 - 3;`\u003cbr\u003e\n###### Multiplication:\n`a = a * 1;` \u003cbr\u003e\n`a = b * c;`\u003cbr\u003e\n`a = 5 * 3;`\u003cbr\u003e\n###### Division:\n`a = a / 1;` \u003cbr\u003e\n`a = b / c;`\u003cbr\u003e\n`a = 5 / 3;`\u003cbr\u003e\n\n\n\n----------------------------------------------------------------------------------------------------------------------------------\n\n# Description of the Grammar: (with print and read commands)\n\nP -\u003e S; | S;P \u003cbr\u003e\nS -\u003e A | W | R | O \u003cbr\u003e\nA -\u003e V1 = E\u003cbr\u003e\nW -\u003e while(E){P} \u003cbr\u003e\nV1 -\u003e V | Vi \u003cbr\u003e\nV -\u003e {a-z}+ [except while] \u003cbr\u003e\nVi -\u003e V[E] \u003cbr\u003e\n\u003cbr\u003e\nE -\u003e E \u003c E1 | E == E1 | E1\u003cbr\u003e\nE1 -\u003e E1 + E2 | E1 - E2 | E2\u003cbr\u003e\nE2 -\u003e E2 * E3 | E2 / E3 | E3\u003cbr\u003e\nE3 -\u003e (E) | V1 | C\u003cbr\u003e\nC -\u003e {0-9}+ . {0-9}k | {0-9}+\u003cbr\u003e\n\u003cbr\u003e\nR -\u003e read V1\u003cbr\u003e\nO -\u003e print V1 | print C\u003cbr\u003e\n\u003cbr\u003e\n\nHere 0 \u003c= j \u003c= B is the precision limit of the decimal point\n\n----------------------------------------------------------------------------------------------------------------------------------\n\n\n# NOTE : \n\nThe name of the file is input.txt.\nThe precision of the decimal point is taken (by default) to be 8.\n\n----------------------------------------------------------------------------------------------------------------------------------\n\n# Instructions to run and compile the code:\n\nCompile:\ngcc simulator.c\n\nRun\n./a.out\n\nThe output can be viewed in output.txt file that would be created.\n----------------------------------------------------------------------------------------------------------------------------------\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpvskand%2Fmini-c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpvskand%2Fmini-c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpvskand%2Fmini-c/lists"}