lolcode

Crates.iololcode
lib.rslolcode
version0.3.1
sourcesrc
created_at2022-07-08 20:57:54.642608
updated_at2022-07-09 22:23:03.386434
descriptionA simple Lolcode to C compiler.
homepage
repositoryhttps://github.com/hobbsbros/lolcode.git
max_upload_size
id622098
size44,005
Joseph Hobbs (josephrhobbs)

documentation

README

LolC

A simple Lolcode to C compiler. Written in Rust.

Installation Instructions

lolc requires an up-to-date installation of Cargo.

cargo install lolcode

What is Lolcode?

Lolcode is an esolang, or esoteric programmming language. Its syntax is intentionally humorous and makes it difficult to use in production use. Subsequently, Lolcode is used exclusively as a joke in the software development community.

Why does this exist?

I developed this Lolcode compiler to help solidify an understanding of Pratt parsing. The parser for Lolcode is based on the principles of Pratt parsing.

Credit to Bob Nystrom at Stuff With Stuff for a really great article that helps explain Pratt parsers. Nystrom uses Java in his implementation (and I use Rust here) but he explains every step very clearly.

Credit to Austin Henley for a great guide on writing compilers.

Credit to Revanth Pothukuchi (GitHub user Hacker007) for explaining to me the parser in his language Envious's compiler, envyc.

Why write it in Rust?

I decided to write this in Rust for a few reasons:

  • Effective & safe type polymorphism
  • Effective error handling
  • Speed
  • I know Rust much better than C++
Commit count: 14

cargo fmt