Date of Award
2023
Document Type
Thesis
Degree Name
Bachelors
Department
Natural Sciences
First Advisor
Lepinski, Matthew
Area of Concentration
Computer Science
Abstract
The implementation of a functional programming language from a drafted syntax is an ambitious undertaking. The average programming language functions with a series of interconnected components, all working sequentially to be able to execute a program. Most scripting languages exist in three major components; A lexer to convert characters into tokens that can be recognized, a parser that can derive meaning and associations from the provided tokens, and a runtime to execute the associations in the form of an AST (Abstract Syntax Tree) generated by the parser. The language I created, Redex, tackles programming language development with a syntax that’s heavily influenced by Rust & JavaScript via their variable declarations keywords, and functionality. Lua, a very popular embedded scripting language offers permissive error handling and a lightweight execution environment, perfect for what I desired for Redex to have. Its low-level compiler adheres to modern conventions, though it strays away a bit with its regex-based tokenization implementation to capture strings and variable literals and handle escape sequences in the tokenization step. Redex was developed to be fast to type, with a long term goal of being able to handle HTTP related traffic like acting as a webserver or sending many concurrent HTTP requests. It aims to keep a lightweight standard library, with just the core functions for handling standard input/output and communicating with the outside world. Redex offers features from both Rust and Lua, with an intuitive and natural to write syntax.
Recommended Citation
Fluegge, Ender, "Redex A proof of concept scripting language in Rust." (2023). Theses & ETDs. 6424.
https://digitalcommons.ncf.edu/theses_etds/6424