{"id":18156514,"url":"https://github.com/purag/pearley","last_synced_at":"2025-05-05T21:48:35.462Z","repository":{"id":35607884,"uuid":"39881228","full_name":"purag/pearley","owner":"purag","description":":white_circle: Pearley is a *shiny* new implementation of the Earley parsing algorithm in Javascript.","archived":false,"fork":false,"pushed_at":"2015-07-31T22:54:30.000Z","size":124,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-31T00:05:36.390Z","etag":null,"topics":["earley-parser","grammar","parser","parser-generator"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/purag.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":"2015-07-29T08:00:21.000Z","updated_at":"2023-09-09T21:04:42.000Z","dependencies_parsed_at":"2022-09-07T11:51:29.135Z","dependency_job_id":null,"html_url":"https://github.com/purag/pearley","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/purag%2Fpearley","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purag%2Fpearley/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purag%2Fpearley/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purag%2Fpearley/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/purag","download_url":"https://codeload.github.com/purag/pearley/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252582771,"owners_count":21771717,"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":["earley-parser","grammar","parser","parser-generator"],"created_at":"2024-11-02T05:06:42.759Z","updated_at":"2025-05-05T21:48:35.431Z","avatar_url":"https://github.com/purag.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pearley\nPearley is a *shiny* new implementation of the Earley parsing algorithm in Javascript.\n\nPearley can parse any context-free grammar, including left-recursive, right-recursive, and ambiguous grammars, and grammars containing epsilon rules (the null/empty rule).\n\n# [math.js](https://jsfiddle.net/purmou/opg92y7h/17/embedded/result/)\nThis demo shows how Pearley can parse math expressions with the +, -, *, and / operators, parentheses, and numbers of arbitrary length.\n\nTo run it, you must include [tokenizer.js](https://purmou.github.io/ParserGen/tokenize.js) from my ParserGen repo to tokenize the strings.\n\nYou can also click the link to see the demo on jsFiddle. Check the console for output. First line of output is the tokenized string, second line of output is the list of tokens parsed by Pearley, and the last line of output is the table of state sets.\n\n# [parens.js](http://jsfiddle.net/purmou/opg92y7h/19/)\nThis demo lets you parse a string containing balanced pairs of parentheses, meaning *n* open parentheses followed by *n* close parentheses.\n\ni.e.\n- `((()))`\n- `()`\n- `` (it works on empty strings)\n- `((((((()))))))`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpurag%2Fpearley","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpurag%2Fpearley","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpurag%2Fpearley/lists"}