# Primagen lexer/parser implementation across languages

**URL:** <https://forum.crystal-lang.org/t/primagen-lexer-parser-implementation-across-languages/6630>\
**Category:** Community\
**Created:** [February 21, 2024, 6:13pm UTC](https://forum.crystal-lang.org/t/primagen-lexer-parser-implementation-across-languages/6630 "2024-02-21T18:13:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![vinit812010](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/vinit812010/32/3111_2.png) [@vinit812010](https://forum.crystal-lang.org/u/vinit812010)\
**Post date:** [February 21, 2024, 6:13pm UTC](https://forum.crystal-lang.org/t/primagen-lexer-parser-implementation-across-languages/6630/1 "2024-02-21T18:13:30Z")

</div>

Just came across Primagen’s github repo where he compare/contrast implementing a language lexer/parser across many different programming languages… might be an interesting read as Crystal is one of the languages used.

> **[GitHub - ThePrimeagen/ts-rust-zig-deez](https://github.com/ThePrimeagen/ts-rust-zig-deez)**
>
> Contribute to ThePrimeagen/ts-rust-zig-deez development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![straight-shoota](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/straight-shoota/32/36_2.png) [@straight-shoota](https://forum.crystal-lang.org/u/straight-shoota)\
**Post date:** [February 21, 2024, 6:37pm UTC](https://forum.crystal-lang.org/t/primagen-lexer-parser-implementation-across-languages/6630/2 "2024-02-21T18:37:38Z")

</div>

It’s just a repository of different implementations, right? No discussion on design principles and the like?

---

<div class="post-metadata">

**Author:** ![vinit812010](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/vinit812010/32/3111_2.png) [@vinit812010](https://forum.crystal-lang.org/u/vinit812010)\
**Post date:** [February 21, 2024, 6:59pm UTC](https://forum.crystal-lang.org/t/primagen-lexer-parser-implementation-across-languages/6630/3 "2024-02-21T18:59:35Z")

</div>

discussion was primarily had on his youtube channel and twitch, but this was an exercise in using the java lexer/parser as a baseline and seeing how various developers versed in different languages would be able to create similar functionality in their language of choice. Prime compared a few languages and at I think he as a video discussing Crystal, which one of his cohosts said was “what Ruby wished it was”

If folks here have time it would be interesting to see what you all think comparing Crystal to other languages in “a sort” of practical programming exercise.

Here is the direct link: There are other videos in the “Code Reviews” category

[![](https://img.youtube.com/vi/V7NCR_QVubs/maxresdefault.jpg "Code Review: Crystal") ](https://www.youtube.com/watch?v=V7NCR_QVubs)

---

<div class="post-metadata">

**Author:** ![Devonte](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/devonte/32/1927_2.png) [@Devonte](https://forum.crystal-lang.org/u/Devonte)\
**Post date:** [February 22, 2024, 11:25am UTC](https://forum.crystal-lang.org/t/primagen-lexer-parser-implementation-across-languages/6630/4 "2024-02-22T11:25:21Z")

</div>

> [@Popular Twitch streamer reviews Crystal code](https://forum.crystal-lang.org/t/popular-twitch-streamer-reviews-crystal-code/5730):
>
> Popular Twitch streamer the Primeagen [reviewed an implementation](https://www.youtube.com/watch?v=V7NCR_QVubs) of monkeylang written [in Crystal](https://github.com/ThePrimeagen/ts-rust-zig-deez/tree/master/crystal) from the book Writing An Interpreter In Go by Thorsten Ball. It’s a short video, but it’s interesting to see the feedback from someone who isn’t familiar with the language or a Ruby developer.

---

<div class="post-metadata">

**Author:** ![vinit812010](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/vinit812010/32/3111_2.png) [@vinit812010](https://forum.crystal-lang.org/u/vinit812010)\
**Post date:** [February 22, 2024, 2:24pm UTC](https://forum.crystal-lang.org/t/primagen-lexer-parser-implementation-across-languages/6630/5 "2024-02-22T14:24:42Z")

</div>

thanks for posting the link

---

<div class="post-metadata">

**Author:** ![MarioAriasC](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/marioariasc/32/1434_2.png) [@MarioAriasC](https://forum.crystal-lang.org/u/MarioAriasC)\
**Post date:** [March 3, 2024, 3:05pm UTC](https://forum.crystal-lang.org/t/primagen-lexer-parser-implementation-across-languages/6630/6 "2024-03-03T15:05:11Z")

</div>

Years ago, I shared a complete implementation of the Monkey Language implemented in Crystal. In its current version, it is faster than the Go Implementation.

> **[GitHub - MarioAriasC/monyet: An implementation of the monkey language on Crystal](https://github.com/MarioAriasC/monyet)**
>
> An implementation of the monkey language on Crystal - MarioAriasC/monyet
