From a82a847dba3ad2f15479e6771d9a48ca25c82df3 Mon Sep 17 00:00:00 2001
From: jwansek <eddie.atten.ea29@gmail.com>
Date: Mon, 15 Nov 2021 15:48:20 +0000
Subject: merged aiden's work with mine

---
 report/esoteric_project_report.tex | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

(limited to 'report/esoteric_project_report.tex')

diff --git a/report/esoteric_project_report.tex b/report/esoteric_project_report.tex
index b8c4f93..bddb721 100644
--- a/report/esoteric_project_report.tex
+++ b/report/esoteric_project_report.tex
@@ -326,7 +326,9 @@ The long string following the sprint number is the git commit at the point in th
 
 \section{Early sprints}
 \subsection{Sprint 1 - \texttt{cb29252f1e0d29d555fb232f39d343930fc76105}}
-The first functional program version was a simple lexical analyser. At this stage no calculations were done. For example:
+The first sprint focused on developing the initial stages of the compiler. The main goal of the first sprint was to create and define the grammar for our custom esoteric language, then to create a working program to handle simple expressions through first applying lexical analysis,  then  using  a  parser. The first section of code implemented was the framework for the compiler, handing the users input and linking each section together.  We decided to give the user the choice of either running the compiler with a single line of code, or running from a file containing source code, with the path given as an argument.  Once completed, work on the lexical scanner could begin.  The bulk of the scanner class is a function with takes the source code string as an argument, and returns an arraylist of tokens.  This was done by looping through each character and assigning the correct token using a switch statement.The  parser  then  takes  this  list  of  tokens  and  forms  an  abstract  syntax  tree,  where each type of expression in our grammar is represented as its own class, extending a base expression class.
+
+For example:
 
 \begin{verbatim}
 Code: 3-1+2
@@ -357,7 +359,9 @@ NUMBER 3 3.0
 \end{verbatim}
 
 \subsection{Sprint 2 - \texttt{69b0ad07bac30beca1397ff187468e7597203c44}}
-This version added simple variable declaration and assignment, as well as a simple calculator. It also added reading from files. For example, running \texttt{java Interpreter.Language example2.txt} where \texttt{example2.txt} is the following:
+The goal of sprint 2 was to introduce statements to the language, starting with the simple print  statement. The  secondary  goal  was  to  add  variable  definition  and  assignment. Firstly text scanning was added to the lexer by first matching a alphabet character, then looking  ahead  until  the  last  character.   The  extracted  text  was  compared  to  a  list  of keywords,  and  either  assigned  a  matching  keyword,  or  set  as  an  identifier.   The  parser was also improved, changing the return result to a list of statements.  In order to more accurately check for undefined variables, an environment class was implemented, which stores any defined variables.  The environment is then checked when a variable is used,which allows for more informative error messages.
+
+For example, running \texttt{java Interpreter.Language example2.txt} where \texttt{example2.txt} is the following:
 
 \begin{verbatim}
 var :: a
@@ -437,6 +441,7 @@ Undefined Variable
 \end{verbatim}
 
 \subsection{Sprint 3 - \texttt{a12094123dcacee41a7472031db6fe6027b083a7}}
+
 This version added full compilation to a binary by translating to a C program and using gcc to compile it straight away. It also added strings as lists of characters, and simple if statements. For example running \texttt{java Compiler.Language example.txt} where \texttt{example.txt} is the program:
 \begin{verbatim}
 character (len=10)::hello
-- 
cgit v1.2.3