{"id":28238366,"url":"https://github.com/expertcoderz/fun-with-pseudocode","last_synced_at":"2025-06-11T01:31:42.833Z","repository":{"id":292001816,"uuid":"973119144","full_name":"Expertcoderz/fun-with-pseudocode","owner":"Expertcoderz","description":"Python utility for parsing CIE AS \u0026 A Level-style pseudocode.","archived":false,"fork":false,"pushed_at":"2025-05-07T15:49:12.000Z","size":60,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-19T01:13:04.309Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Expertcoderz.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-26T09:51:50.000Z","updated_at":"2025-05-07T15:49:16.000Z","dependencies_parsed_at":"2025-05-07T16:50:43.843Z","dependency_job_id":"69da2f1a-709f-4f7a-8127-6d282cce604e","html_url":"https://github.com/Expertcoderz/fun-with-pseudocode","commit_stats":null,"previous_names":["expertcoderz/fun-with-pseudocode"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Expertcoderz%2Ffun-with-pseudocode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Expertcoderz%2Ffun-with-pseudocode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Expertcoderz%2Ffun-with-pseudocode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Expertcoderz%2Ffun-with-pseudocode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Expertcoderz","download_url":"https://codeload.github.com/Expertcoderz/fun-with-pseudocode/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Expertcoderz%2Ffun-with-pseudocode/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259180918,"owners_count":22817831,"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":[],"created_at":"2025-05-19T01:12:49.247Z","updated_at":"2025-06-11T01:31:42.827Z","avatar_url":"https://github.com/Expertcoderz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fun with Pseudocode\n\nFun with Pseudocode (or `fwp` for short) is a Python utility to parse\n\"pseudocode\" with syntax based on the Cambridge International A \u0026 AS Level\nComputer Science [Pseudocode Guide for Teachers](https://www.cambridgeinternational.org/Images/697401-2026-pseudocode-guide-for-teachers.pdf).\n\nThis project is a fun exercise. It has no intended practical application. It is\nalso largely unfinished as of now; not all language features have been\nimplemented or rigorously tested.\n\n## Usage\n\n```sh\n$ python -m fwp --help\n```\n\nRequires [Lark](https://github.com/lark-parser/lark) to be installed.\n\nSample pseudocode programs are provided under the `examples` directory.\n\n## The Process\n\n```txt\n                   +--------------+\n                   | EBNF grammar |\n                   +---|----------+\n                       |\n+-------------------+  V   +------------+     +----+\n| Pseudocode source | ---\u003e | Parse tree | --\u003e | IR | ---\u003e ???\n+-------------------+      +------------+     +----+\n```\n\n1. **Parsing:** the pseudocode source is first run through the parser to\n   generate a parse tree. [Lark](https://github.com/lark-parser/lark) is used as\n   the parser generator, and supplied with the EBNF definition of the pseudocode\n   language (see `fwp/grammar.lark`). The parser performs lexical analysis\n   (tokenization) and parsing of the pseudocode source, resulting in a parse\n   tree. Pass the `-P` option to stop at the parsing stage and view the parse\n   tree.\n\n2. **Intermediate representation (IR) generation:** the IR is implemented as a\n   hierarchy of Python objects that comprise a tree structure. It is essentially\n   a parse tree with some semantics added. However, unlike most other IRs there\n   is no actual text or binary format for which to store such generated IR,\n   which exists purely as a Python object. To view the IR as a nicely formatted\n   S-expression, pass the `-S` option.\n\n3. Now all that's left is to do something useful with the IR. This has yet to be\n   decided upon.\n\n## License\n\nFun with Pseudocode is licensed under the AGPLv3. See the LICENSE file for more\ninformation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexpertcoderz%2Ffun-with-pseudocode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexpertcoderz%2Ffun-with-pseudocode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexpertcoderz%2Ffun-with-pseudocode/lists"}