This organization was established to facilitate the development of a BNF interpreter.
The interpreter was the culminating project for CS460: Programming Languages at Sonoma State University during the Fall 2024 semester. Collaboratively created by a team of five students, this project presents an interpreter designed to process and execute code written in Backus-Naur Form (BNF), a C-like programming language. The interpreter interprets the input in BNF, analyzes its structure and logic, and executes the corresponding computations to generate the desired output. This project exemplifies advanced concepts in parsing, syntax analysis, data structures, and interpreter design.
The interpreter was constructed through a modular design, composed of several key components that work in sequence to process the input code. These components include:
-
Comment Removal: Eliminates non-executable comments to prepare the input for further processing.
-
Tokenization: Breaks the input into meaningful tokens, such as keywords, identifiers, and symbols, forming the building blocks of the program.
-
Recursive Descent Parsing: Analyzes the tokenized input based on the defined BNF grammar, ensuring syntactical correctness while building a structural representation of the code. Generates a Concrete Syntax Tree (CST) representing program strucutre.
-
Symbol Table Generation: Creates a mapping of variables, functions, and other symbols to their corresponding definitions and values, enabling efficient lookup during execution.
-
Abstract Syntax Tree (AST) Generation: Constructs a tree representation of the program that encapsulates its logical structure and relationships, serving as the foundation for execution.
-
Interpreter: Constructs the full interpreter using a combination of the prior componets.
Each component builds on the outputs of the previous stage, concluding in a fully functional interpreter capable of processing complex inputs and producing correct results. This layered approach highlights the importance of modularity and abstraction in software engineering and programming language design.
Blake Marshall - Github | LinkedIn
Brandon Robison - Github | LinkedIn
Holden Ea - Github | LinkedIn
Jacob Sellers - Github | LinkedIn
Rolando Yax - Github | LinkedIn