{"id":24299409,"url":"https://github.com/janbaig/pratt-parser","last_synced_at":"2025-10-27T20:04:41.457Z","repository":{"id":161541040,"uuid":"577028211","full_name":"janbaig/pratt-parser","owner":"janbaig","description":"A Top Down Operator Precedence Parser","archived":false,"fork":false,"pushed_at":"2023-10-27T21:11:26.000Z","size":73,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-16T21:50:48.019Z","etag":null,"topics":["parser","pratt-parser"],"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/janbaig.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":"2022-12-11T18:50:43.000Z","updated_at":"2025-01-07T02:56:47.000Z","dependencies_parsed_at":"2025-01-16T21:41:55.400Z","dependency_job_id":"a960bc2e-d86a-4a01-a5c8-d76337bf90fd","html_url":"https://github.com/janbaig/pratt-parser","commit_stats":null,"previous_names":["janbaig/tdop-parser","janbaig/pratt-parser"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janbaig%2Fpratt-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janbaig%2Fpratt-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janbaig%2Fpratt-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janbaig%2Fpratt-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/janbaig","download_url":"https://codeload.github.com/janbaig/pratt-parser/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242196308,"owners_count":20087765,"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":["parser","pratt-parser"],"created_at":"2025-01-16T21:41:48.874Z","updated_at":"2025-10-27T20:04:36.401Z","avatar_url":"https://github.com/janbaig.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TDOP-Parser\n\nTop Down Operator Precedence (TDOP) parsing is a parsing technique introduced by Vaughan Pratt in a 1973 paper. \nThe technique combines the best properties of recursive descent and operator precedence.\n\nThis program can successfully parse and evaluate a given expression in accordance to a predefined set of precedence rules.\n\n## Example\nIn accordance to BEDMAS, the input expression `2 * 10 / 5 - 1 + 4` can be successfully parsed and evaluated. The following is the output: \n```\n\u003e 2 * 10 / 5 - 1 + 4\n\nPrecedence Parsing:\n( ( 2 * ( 10 / 5 ) ) - ( 1 + 4 ) )\n\nInterpreter results:\n-1\n\nTree Structure:\nLeft: 10, Right: 5, Operator: /\nLeft: 2, Right: ( 10 / 5 ), Operator: *\nLeft: 1, Right: 4, Operator: +\nLeft: ( 2 * ( 10 / 5 ) ), Right: ( 1 + 4 ), Operator: -\n```\n\n## Precedence Table (BEDMAS) \n| Operator      | Precedence |\n| ----------- | ----------- |\n| `-`   | 0       |\n| `+`   | 1        |\n| `*`   | 2        |\n| `/`   | 3        |\n\n## Future Goals\n- [x] Implement a Custom Lexer\n- [x] Implement a Stack-based Interpreter\n- [ ] Support for Unary \u0026 Ternary Operators\n- [ ] Allow decimal values as input \n- [ ] Create User Interface\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanbaig%2Fpratt-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjanbaig%2Fpratt-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanbaig%2Fpratt-parser/lists"}