{"id":15645977,"url":"https://github.com/jaredly/myntax","last_synced_at":"2025-10-12T09:33:29.332Z","repository":{"id":66952811,"uuid":"67444900","full_name":"jaredly/myntax","owner":"jaredly","description":null,"archived":false,"fork":false,"pushed_at":"2019-01-26T22:30:21.000Z","size":594,"stargazers_count":52,"open_issues_count":2,"forks_count":3,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-06-10T06:38:50.038Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"OCaml","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/jaredly.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}},"created_at":"2016-09-05T19:10:04.000Z","updated_at":"2025-05-10T10:42:23.000Z","dependencies_parsed_at":"2024-01-14T17:04:22.820Z","dependency_job_id":"f853f515-41d2-45ad-802d-5a7d83525f7a","html_url":"https://github.com/jaredly/myntax","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jaredly/myntax","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredly%2Fmyntax","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredly%2Fmyntax/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredly%2Fmyntax/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredly%2Fmyntax/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaredly","download_url":"https://codeload.github.com/jaredly/myntax/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredly%2Fmyntax/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010936,"owners_count":26084837,"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-10-12T02:00:06.719Z","response_time":53,"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-03T12:10:49.108Z","updated_at":"2025-10-12T09:33:29.314Z","avatar_url":"https://github.com/jaredly.png","language":"OCaml","funding_links":[],"categories":["Languages"],"sub_categories":["OCaml"],"readme":"\n# Myntax\nA parser, converter, and pretty-printer generator for OCaml.\n\nBased on https://rwmj.wordpress.com/2010/12/29/packrat-parser-with-left-recursion/, with heavy modifications.\n\n- [Defining a Grammar](docs/Grammar.md)\n- [The Lisp.re grammar generated documentation](docs/LispGrammar.md)\n\n# Contributing\n\n- `npm install`\n- `npm run build` (you'll have to run this a couple times before it compiles without error 🙃)\n- `cd reason-lisp`\n- `npm install` (this will fail)\n- `cd node_modules; rm -rf myntax; ln -s ../../ myntax; cd ..`\n- `npm run build`\n\nyeah it's pretty hacky. I think I might just switch over to esy+dune soon\n\n\n# Lisp.re\nNOTE: this is all out of date\n\nBuilding \u0026 using the lisp-to-ocaml parser\n\n- clone this repo\n- `npm install`\n- `npm run build`\n- `./lib/bs/native/lisp.native ml some-file.rel` will print out the lisp.re file converted to ocaml syntax\n- `./lib/bs/native/lisp.native bin some-file.rel \u003e some-file.ast` will act as a `-pp`, it will output the binary representation of the ocaml AST to standard out (here redirected into a file). You can then compile it like `ocamlc -impl some-file.ast`.\n\n## Using Lisp.re in a real project\n\nThe ocaml compiler actually makes this super easy :D.\n\n`watch.js` is a script that, when run with a directory, will watch the `.rel` files in that directory, and recompile them when they change, piping the binary output into the equivalent `.ml` file. You can then have bucklescript watching the directory, or jbuilder running, and they will treat the binary `.ml` file as a perfectly normal source file.\n\n`npm run example` will start the watcher for `example/src`. You can then start bsb in the example directory with `cd example \u0026\u0026 npm start`, and edit `example/src/Hello.rel` and see bsb recompile.\n\n# TODO\n\n## Parsing\n\n- [ ] better error messages! I think I can add nice messages to a given rule item, detailing what the correct syntax should be. Like \"in a record declaration, you can only do :keyword and :keyword int\". Although maybe I can do that automatically? That would be super cool. Also I could generate \"examples\" automatically via the pretty printer. Would want to generate \"minimally interesting\" examples, that followed the longest branch that we were on.\n\n## Pretty-printing\n\n- [ ] preserving newlines between forms would be nice\n- [ ] preserve comments pls\n- [ ] I want to be able to represent the \"fill box\" from Format. Also specify indentation groups, etc.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredly%2Fmyntax","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaredly%2Fmyntax","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredly%2Fmyntax/lists"}