{"id":13483494,"url":"https://github.com/ziprandom/cltk","last_synced_at":"2025-03-27T14:31:26.835Z","repository":{"id":141082593,"uuid":"55094624","full_name":"ziprandom/cltk","owner":"ziprandom","description":"A crystal port of the Ruby Language Toolkit","archived":false,"fork":false,"pushed_at":"2023-04-02T12:56:23.000Z","size":2427,"stargazers_count":73,"open_issues_count":6,"forks_count":9,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-10-30T17:47:53.646Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://ziprandom.github.io/cltk","language":"Crystal","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/ziprandom.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-03-30T20:15:10.000Z","updated_at":"2024-06-12T21:16:38.000Z","dependencies_parsed_at":"2024-01-27T09:09:56.299Z","dependency_job_id":"fe47aac8-6c5a-4fd2-ba9c-453e114b7585","html_url":"https://github.com/ziprandom/cltk","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziprandom%2Fcltk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziprandom%2Fcltk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziprandom%2Fcltk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziprandom%2Fcltk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ziprandom","download_url":"https://codeload.github.com/ziprandom/cltk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245863091,"owners_count":20684787,"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":[],"created_at":"2024-07-31T17:01:11.969Z","updated_at":"2025-03-27T14:31:23.640Z","avatar_url":"https://github.com/ziprandom.png","language":"Crystal","funding_links":[],"categories":["Implementations/Compilers"],"sub_categories":[],"readme":"# cltk [![Build Status](https://api.travis-ci.org/ziprandom/cltk.svg)](https://travis-ci.org/ziprandom/cltk)\n\nThis is a port of the [Ruby Language Toolkit](https://github.com/chriswailes/RLTK) to the [Crystal Programming Language](http://crystal-lang.org/).\n\n**CLTK (like RLTK) is:** a collection of classes and methods designed to help programmers create languages in an easy to use and straightforward manner. This toolkit provides the following features:\n\n* 2 Lexer generators based on [PCRE Regexps from crystals STD Lib](https://ziprandom.github.io/cltk/CLTK/Lexer.html) and a [second faster one](https://ziprandom.github.io/cltk/CLTK/Scanner.html) based on the [crystal-dfa](https://github.com/ziprandom/crystal-dfa) DFA automaton implementation\n* Parser generator\n* AST node baseclass\n* Class for representing context free grammars\n\nIn addition, CLTK includes several ready-made lexers and parsers. As well as a [serialization mechanism](https://github.com/ziprandom/cltk/blob/master/src/cltk/parser/crystalize.cr#L24) that renders a finalized parser back into crystal syntax to compile it without having to be finalized again at startup (see [exp_lang_repl](examples/exp_lang/exp_lang_repl.cr) for a usage example).\n\nTo see what works have a look at the specs or run them with:\n\n```crystal\n$ crystal spec\n```\n\nThe Implementation has been strongly altered but the API is compatible to RLTK. The LLVM Bindings has not been ported. Instead crystals own LLVM Bindings were used in [`examples/kazoo/chapter 8/kcontractor.cr`](https://github.com/ziprandom/cltk/blob/master/examples/kazoo/chapter_8/kcontractor.cr)\n\n## Usage\n\nTo use the toolkit in your project add this to your application's `shard.yml`:\n\n```yaml\ndependencies:\n  cltk:\n    github: ziprandom/cltk\n```\n\n### Examples\n\nSee the example languages (and their specs):\n* **interpreted language EXP_LANG** (`examples/exp_lang`)\n* **kazoo**  (`examples/kazoo/chapter 8`) with LLVM IR generation\n* **brainfuck** (`examples/brainfuck`)\n* **json_parser** (`examples/json_parser`) example of a linter / xml converter\n\n## Documentation\n\ncan be found in the [docs](https://ziprandom.github.io/cltk/) directory\n\n## Contributing\n\n1. Fork it ( https://github.com/ziprandom/cltk/fork )\n2. Create your feature branch (git checkout -b my-new-feature)\n3. Commit your changes (git commit -am 'Add some feature')\n4. Push to the branch (git push origin my-new-feature)\n5. Create a new Pull Request\n\n## Contributors\n\n- [ziprandom](https://github.com/ziprandom)  - creator of the port, maintainer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fziprandom%2Fcltk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fziprandom%2Fcltk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fziprandom%2Fcltk/lists"}