{"id":15420248,"url":"https://github.com/jakebailey/dr","last_synced_at":"2025-11-12T22:30:30.262Z","repository":{"id":57600042,"uuid":"83287492","full_name":"jakebailey/dr","owner":"jakebailey","description":"ERE derivative-based regex engine","archived":false,"fork":false,"pushed_at":"2017-03-15T13:53:53.000Z","size":18,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-08T06:45:25.718Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jakebailey.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":"2017-02-27T08:38:22.000Z","updated_at":"2018-02-15T19:07:12.000Z","dependencies_parsed_at":"2022-09-16T19:00:43.978Z","dependency_job_id":null,"html_url":"https://github.com/jakebailey/dr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jakebailey/dr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakebailey%2Fdr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakebailey%2Fdr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakebailey%2Fdr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakebailey%2Fdr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jakebailey","download_url":"https://codeload.github.com/jakebailey/dr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakebailey%2Fdr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":284122919,"owners_count":26951149,"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","status":"online","status_checked_at":"2025-11-12T02:00:06.336Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2024-10-01T17:28:46.751Z","updated_at":"2025-11-12T22:30:30.238Z","avatar_url":"https://github.com/jakebailey.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dr\nERE derivative-based regex engine\n\n[![GoDoc](https://godoc.org/github.com/jakebailey/dr?status.svg)](http://godoc.org/github.com/jakebailey/dr)\n\nThis is based on the derivative-based membership checking from\n[CS 598 GR](http://fsl.cs.illinois.edu/index.php/CS598_-_Runtime_Verification_(Spring_2017)), aka Runtime Verification.\n\nThe implementation is relatively trivial (it's quite literally the same as the paper),\nso it might as well be public. The parser was the time consuming part.\n\n\"dr\" comes from dR, i.e. derivative of R, because I think I'm funny.\n\nThe syntax uses `!` for complement, `*` for the Kleene star, `+` for union, and\n`.` for any character.\n\nThe characters `+*!\\().` can be escaped by prefixing with a `\\`.\n\nThe output of the test program in `cmd/drtest` is:\n\n```\nasdfg =\u003e asdfg\naaa+bbb =\u003e (aaa)+(bbb)\n!(a)b*(cd)*e+f =\u003e (!(a)(b)*(cd)*e)+(f)\n\\+\\++\\*(\\!\\\\) =\u003e (\\+\\+)+(\\*\\!\\\\)\n\nmatching against ab(c)*\n: false\na: false\nab: true\nabc: true\nabccccc: true\n```\n\nWhich shows the input and output after parsing and generating the regex, as well\nas various examples of matching a common expression.\n\nIn addition to those rules described in class, I've also added a rule for `.` (any),\nwhich accepts any single character, although, it could have been represented by\n`(!a+a)`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakebailey%2Fdr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjakebailey%2Fdr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakebailey%2Fdr/lists"}