Compiler for a toy language in a web browser
Abstract
Many websites exist today that allow users to compile code. Most of these websites require a network call to a remote server in order to compile this code. This is theoretically not necessary and is inefficient. EMCA Script (common name “JavaScript”), continues to grow as a programming language capable of building full scale applications. The goal of this thesis is to demonstrate that JavaScript can be used to implement language translators on the browser platform. This thesis presents a compiler for a small, Haskell-inspired toy language that can compute mathematical expressions. It documents a proof-of-concept computer programming of writing a compiler in JavaScript that can be run in a web browser.