{"id":20302459,"url":"https://github.com/charlesaverill/purple","last_synced_at":"2025-10-30T03:43:17.192Z","repository":{"id":59410594,"uuid":"534360715","full_name":"CharlesAverill/Purple","owner":"CharlesAverill","description":"Purple standard language specification and compiler implementation","archived":false,"fork":false,"pushed_at":"2023-06-22T15:50:21.000Z","size":24357,"stargazers_count":5,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-04-20T00:54:42.721Z","etag":null,"topics":["c","compiler","programming-language","programming-language-development"],"latest_commit_sha":null,"homepage":"http://charles.systems/Purple/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CharlesAverill.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-08T19:18:24.000Z","updated_at":"2023-07-07T12:12:58.000Z","dependencies_parsed_at":"2023-01-19T14:32:58.863Z","dependency_job_id":null,"html_url":"https://github.com/CharlesAverill/Purple","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/CharlesAverill%2FPurple","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CharlesAverill%2FPurple/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CharlesAverill%2FPurple/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CharlesAverill%2FPurple/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CharlesAverill","download_url":"https://codeload.github.com/CharlesAverill/Purple/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224653623,"owners_count":17347588,"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":["c","compiler","programming-language","programming-language-development"],"created_at":"2024-11-14T16:31:40.668Z","updated_at":"2025-10-30T03:43:12.174Z","avatar_url":"https://github.com/CharlesAverill.png","language":"C","readme":"# Purple Language Documentation\n\nThe standard language specification and compiler for Purple, a general-purpose, C-like language intended to introduce higher-level functionality and lower-level memory access.\n\n[Original Implementation](https://github.com/CharlesAverill/purple_archive/)\n\n\n\u003c!--\n\nPurple is a simple compiled language. Right now it supports:\n- Compilation into x86, MIPS\n- Basic arithmetic parsing with precedence\n- Comparisons\n- Variable declaration and assignment\n- If, Else statements\n- While Loops\n\n--\u003e\n\n## Installation\n\nView the source \u003ca href=\"https://github.com/CharlesAverill/Purple\" target=\"_blank\"\u003ehere\u003c/a\u003e.\n\n### Dependencies\n\n- `clang-{10+}`\n- `libclang-{10+}-dev`\n\nPurple may be built with cmake:\n```bash\ncmake -B build\ncmake --build build\n\nbin/purple example_file.prp\n```\n\n## Grammar\n\nBNF-formatted grammar for Purple can be found here: [Purple Grammar Documentation](purple.g)\n\n## Examples\n\nPurple uses C-style syntax, although this may change as the compiler is built\n\n```c\nvoid main(void) {\n    int bob;\n    int alice;\n\n    bob = 5;\n    alice = 10;\n\n    print bob + alice; // 15\n    print bob \u003e alice; // 0\n\n    int bob_alice;\n    bob_alice = 10 + 10 + bob + alice; // 35\n    if(bob_alice \u003e 30){\n        print bob_alice;\n    }\n\n    int i;\n    i = 0;\n    while (i \u003c 20) {\n        print i;\n        i = i + 1;\n    } else {\n        print i == 0 or true; // true\n    }\n}\n```\n\nMore examples can be viewed \u003ca href=\"https://github.com/CharlesAverill/Purple/tree/main/examples\" target=\"_blank\"\u003ehere\u003c/a\u003e.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharlesaverill%2Fpurple","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcharlesaverill%2Fpurple","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharlesaverill%2Fpurple/lists"}