cltk
Version, currently 0.0.412 versions
- 0.1.1latestJun 20, 2018
- 0.1.0not indexedApr 2, 2023
- 0.0.11not indexedApr 2, 2023
- 0.0.10not indexedApr 2, 2023
- 0.0.9not indexedApr 2, 2023
- 0.0.8not indexedApr 2, 2023
- 0.0.7not indexedApr 2, 2023
- 0.0.6not indexedApr 2, 2023
- 0.0.5not indexedApr 2, 2023
- 0.0.4not indexedApr 2, 2023
- 0.0.3not indexedApr 2, 2023
- 0.0.2not indexedApr 2, 2023
github.com/ziprandom/cltk
A Collection of Classes to define Lexers, Parsers & Abstract Syntax Trees. A port of the Ruby Language Toolking written by Chris Wailes
Nothing has been indexed for 0.0.4 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.
Installation
# Add this to your shard.yml
dependencies:
cltk:
github: ziprandom/cltk
version: ~> 0.0.4Then run:
shards installshard.yml
No shard.yml has been indexed for 0.0.4. You can read it on the repository.
Dependencies
Unknown: the shard.yml for this version has not been read yet.
README
This README is the one indexed from the repository at its latest ref, not from the tag for this version.
# cltk [](https://travis-ci.org/ziprandom/cltk)
This is a port of the [Ruby Language Toolkit](https://github.com/chriswailes/RLTK) to the [Crystal Programming Language](http://crystal-lang.org/).
**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:
* 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
* Parser generator
* AST node baseclass
* Class for representing context free grammars
In 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).
To see what works have a look at the specs or run them with:
```crystal
$ crystal spec
```
The 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)
## Usage
To use the toolkit in your project add this to your application's `shard.yml`:
```yaml
dependencies:
cltk:
github: ziprandom/cltk
```
### Examples
See the example languages (and their specs):
* **interpreted language EXP_LANG** (`examples/exp_lang`)
* **kazoo** (`examples/kazoo/chapter 8`) with LLVM IR generation
* **brainfuck** (`examples/brainfuck`)
* **json_parser** (`examples/json_parser`) example of a linter / xml converter
## Documentation
can be found in the [docs](https://ziprandom.github.io/cltk/) directory
## Contributing
1. Fork it ( https://github.com/ziprandom/cltk/fork )
2. Create your feature branch (git checkout -b my-new-feature)
3. Commit your changes (git commit -am 'Add some feature')
4. Push to the branch (git push origin my-new-feature)
5. Create a new Pull Request
## Contributors
- [ziprandom](https://github.com/ziprandom) - creator of the port, maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.0.4- Tagged
- Apr 2, 2023
- Commit
5163c4921ac4- Indexed
- not yet
Dependents
No indexed shard depends on this one yet.
Repository
github.com/ziprandom/cltk
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 12, 2026
- Synced
- Aug 12, 2026
- Versions
- 12