Skip to content

A toy language (Developed off-and-on from 2022 to 2024).

License

Notifications You must be signed in to change notification settings

RedBedHed/boic-v1.0

Repository files navigation

Boi

The Language of Memes

Version 1.0
(art generated at openart.ai)

Introduction

Boi is a toy programming language in which all keywords contain the substring "boi". As you can tell, it is meant to be taken very seriously, and you should definitely waste your time learning it.

Index

  1. Boilang Manual
  2. Example Boi Programs
  3. Lexer Notes
  4. Parser Notes

FAQ

How Does the Boi Compiler Work?

Boic— at the highest level— is the bash shell script, boic.sh.

Boic executes the comp binary. Comp lexes your file according to the Boi Lexical Specification, turning it into a list of "Tokens" (lexeme/token structures). Next, it feeds this list of Tokens to a Recursive Descent parser, which transforms all expressions into Abstract Syntax Trees and generates x86 intel-syntax assembly as it parses the trees and control flow. Boic then tells GCC to assemble the generated assembly and link it with the library file, creating an executable binary with relative addresses. Boic then executes this binary from your shell, replacing its relative addresses with physical addresses, loading it into RAM, and running it on your CPU.

Does the Boi Compiler Generate Optimal Assembly?

No.

Boic v1.0 generates assembly that works. It simplifies literal expressions, but leaves everything else for runtime.

Is Boi Turing-Complete?

Yes!

Boi can express a Brainfuck interpreter. Brainfuck is Turing-complete.

About

A toy language (Developed off-and-on from 2022 to 2024).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages