Primagen lexer/parser implementation across languages

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.


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

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

1 Like

thanks for posting the link

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.