This Haskell project is an implementation of a stack-based language interpreter. The main functionalities include parsing, compiling, and executing a simple programming language with arithmetic and boolean expressions, conditional statements, and looping constructs.
- Group Number: T09 G03
- Members:
- Lucas Borborema Nakajima: 50%
- Ian da Nóbrega Beltrão: 50%
- Parser and Lexer: The parser and lexer are responsible for converting input strings into a series of instructions. These components handle various expressions and statements, including arithmetic operations, variable assignments, and control structures.
- Arithmetic Operations: The implementation supports basic arithmetic operations such as addition, subtraction, and multiplication.
- Control Structures: Conditional statements (if-else) and looping constructs (while) are implemented to control the flow of the program.
- Stack Manipulation: The core of the program operates on a stack, where all computations are performed.
- Error Handling: The program includes error handling for invalid operations and syntax errors.
- Ensure that GHC (Glasgow Haskell Compiler) is installed on your system.
- Navigate to the directory containing
main.hs
. - Compile the program using GHC:
ghc main.hs
- Run the compiled program:
.\main.exe