{"id":23642416,"url":"https://github.com/sogaiu/margaret","last_synced_at":"2026-02-09T08:03:12.269Z","repository":{"id":118761955,"uuid":"416184341","full_name":"sogaiu/margaret","owner":"sogaiu","description":"A Janet implementation of Janet’s peg/match","archived":false,"fork":false,"pushed_at":"2025-02-03T04:43:58.000Z","size":400,"stargazers_count":14,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-03T05:28:43.700Z","etag":null,"topics":["debug","janet","peg","trace"],"latest_commit_sha":null,"homepage":"","language":"Janet","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/sogaiu.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":"support/path.janet","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-12T04:34:47.000Z","updated_at":"2025-02-03T04:44:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"c6de2b60-1f08-4778-add4-a9d8b1427a45","html_url":"https://github.com/sogaiu/margaret","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/sogaiu%2Fmargaret","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sogaiu%2Fmargaret/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sogaiu%2Fmargaret/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sogaiu%2Fmargaret/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sogaiu","download_url":"https://codeload.github.com/sogaiu/margaret/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239581760,"owners_count":19662960,"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":["debug","janet","peg","trace"],"created_at":"2024-12-28T10:50:50.272Z","updated_at":"2026-02-09T08:03:07.230Z","avatar_url":"https://github.com/sogaiu.png","language":"Janet","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Margaret - Janet's peg/match in Janet\n\nThis aims to be a pure-Janet implementation of Janet's `peg/match`.\n\nApart from having fun, here are some reasons [why](doc/why.md) this\ncould be of some interest.\n\n## Setup\n\n* Clone this repository and cd to the relevant directory\n\n* Ensure `janet` and `jpm` are on your `PATH`\n\n* Install if you like: `jpm install`\n\n## Usage\n\n### Basic Use\n\n`meg/match` is an attempt at implementing `peg/match`, so for example,\nif `margaret` has already been installed:\n\n```janet\n(import margaret/meg)\n\n(meg/match ~(capture (some \"smile\")) \"smile!\")\n```\n\nshould work.\n\n### Tracing\n\nThere is some primitive support for tracing.  It can be enabled by\nsetting the `VERBOSE` environment variable to a non-empty string.\n\nEither:\n\n* set the `VERBOSE` env var (say to \"1\") before starting `janet`, or\n* use `(os/setenv \"VERBOSE\" \"1\")` in code\n\nbefore calling `meg/match`.\n\nOutput format is very much in-flux but ATM one can see:\n\n* capture stack\n* tags\n* specials execution order\n\n...and other details.\n\nSee [here](doc/tracing.md) for more.\n\n## Users\n\n* [janet-pegdoc](https://github.com/sogaiu/janet-pegdoc) reuses examples\n  from margaret to show sample invocations of `peg/match` as well as\n  a source for generating quizzes.\n\n* [small-peg-tracer](https://github.com/sogaiu/small-peg-tracer) uses\n  the emulation and tracing capabilities of margaret while generating\n  views of simulated `peg/match` execution.\n\n## Other Docs\n\n* [The Specials](doc/the-specials.md) lists what's currently implemented\n* [Tutorials](doc/tutorials.md) of a sort\n* [Testing](doc/testing.md) details\n* [Implementation Notes](doc/implementation-notes.md) for the curious\n* [Credits](doc/credits.md) to acknowledge help","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsogaiu%2Fmargaret","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsogaiu%2Fmargaret","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsogaiu%2Fmargaret/lists"}