{"id":13626605,"url":"https://github.com/hexops/zorex","last_synced_at":"2025-04-16T14:34:07.624Z","repository":{"id":47284249,"uuid":"341861898","full_name":"hexops/zorex","owner":"hexops","description":"Zorex: the omnipotent regex engine","archived":false,"fork":false,"pushed_at":"2021-12-23T08:38:36.000Z","size":2507,"stargazers_count":67,"open_issues_count":3,"forks_count":4,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-11T23:41:05.164Z","etag":null,"topics":["pattern-matching","regex","regexp"],"latest_commit_sha":null,"homepage":"","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hexops.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"slimsag"}},"created_at":"2021-02-24T10:24:56.000Z","updated_at":"2025-03-11T11:52:32.000Z","dependencies_parsed_at":"2022-08-27T14:46:55.779Z","dependency_job_id":null,"html_url":"https://github.com/hexops/zorex","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/hexops%2Fzorex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexops%2Fzorex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexops%2Fzorex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexops%2Fzorex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hexops","download_url":"https://codeload.github.com/hexops/zorex/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249250843,"owners_count":21237961,"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":["pattern-matching","regex","regexp"],"created_at":"2024-08-01T21:02:24.693Z","updated_at":"2025-04-16T14:34:07.314Z","avatar_url":"https://github.com/hexops.png","language":"Zig","readme":"# Zorex: the omnipotent regex engine \u003ca href=\"https://hexops.com\"\u003e\u003cimg align=\"right\" alt=\"Hexops logo\" src=\"https://raw.githubusercontent.com/hexops/media/main/readme.svg\"\u003e\u003c/img\u003e\u003c/a\u003e\n\n[![CI](https://github.com/hexops/zorex/workflows/CI/badge.svg)](https://github.com/hexops/zorex/actions)\n\nZorex blurs the line between regex engine and advanced parsing algorithms used to parse programming languages.\n\nWith the most powerful of regex engines today, you [can't parse HTML](https://stackoverflow.com/questions/6751105/why-its-not-possible-to-use-regex-to-parse-html-xml-a-formal-explanation-in-la) (a context-free language) [or XML](https://stackoverflow.com/a/8578999) ([a context-sensitive language](https://softwareengineering.stackexchange.com/a/205725)), but _you can_ with Zorex.\n\n## ⚠️ Project status: in-development ⚠️\n\nUnder heavy development, not ready for use currently. [Follow me on Twitter](https://twitter.com/slimsag) for updates.\n\n## How does it work?\n\nBehind the scenes, Zorex parses a small DSL (the \"zorex syntax\", a regex-like syntax that enables opt-in [EBNF-like syntax](https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form)) and then [at runtime builds a parser specifically for your input grammar](https://devlog.hexops.com/2021/zig-parser-combinators-and-why-theyre-awesome).\n\nIt's a bit like a traditional parser generator, but done at runtime (instead of through code generation) and with a deep level of syntactic compatibility with traditional regex engines.\n\nIt uses [an optimized GLL parser combinator framework called Combn](./src/combn/README.md) to support parsing some of the most complex languages, including left-and-right recursive context-free and some context-sensitive languages, in a fast way.\n\n## A quick note about academic terminology\n\nTechnically, Zorex is \"an advanced pattern matching engine\", and it is arguably incorrect to call it a _regular expression engine_ because regular expressions by nature cannot parse non-regular languages (such as HTML).\n\nAny regex engine that supports backtracking, however, is _also_ \"not a regular expression engine\", as the author of Perl's regex engine Larry Wall [puts it](https://raku.org/archive/doc/design/apo/A05.html):\n\n\u003e “Regular expressions” […] are only marginally related to real regular expressions. Nevertheless, the term has grown with the capabilities of our pattern matching engines, so I’m not going to try to fight linguistic necessity here. I will, however, generally call them “regexes” (or “regexen”, when I’m in an Anglo-Saxon mood).\n\nSince the aim of Zorex is to maintain a deep level of syntactical compatibility with other regex engines people are familiar with, and _further extend that_ to support parsing more complex non-regular languages, we call Zorex a regex engine.\n","funding_links":["https://github.com/sponsors/slimsag"],"categories":["Zig"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhexops%2Fzorex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhexops%2Fzorex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhexops%2Fzorex/lists"}