diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..43db565054bcb34ef91b1805c2732effabd9d294
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+*.o
+lab1/scanner
+lab1/scanner.cc
+lab3-4/scanner.cc
+lab3-4/parser.cc
+lab3-4/parser.hh
+lab3-4/compiler
\ No newline at end of file
diff --git a/doc/source/lab2.rst b/doc/source/lab2.rst
index af8bcc8c927e4c92fe21977b52c6ff801b2ecc24..29724407da66f94936a42baf2530962fb1732c8c 100644
--- a/doc/source/lab2.rst
+++ b/doc/source/lab2.rst
@@ -132,3 +132,34 @@ The file ``main.cc`` contains a sample main program.
 You may have to modify it depending on how you choose to report errors from your parser.
 If the scanner encounters an error it will throw an object of type :class`ScannerError`.
 Your main program should catch this exception (the sample main program does), print an error message (you can print a :class:`ScannerError` object using stream operators) and then perform error recovery.
+
+Testing your solution
+---------------------
+A test script is available called test.py with an auxilary file called test.txt.
+You may test your solution by using the following command::
+  python3 test.py test.txt
+The output of running this test program should be something like this::
+  =============================================================================
+ |  0:                   1+2*3^-4 | Expected: 1.02469 | Got: 1.02469 |  PASS |
+ |  1:                      1+2/3 | Expected: 1.66667 | Got: 1.66667 |  PASS |
+ |  2:                    (1+2)/3 | Expected:       1 | Got:       1 |  PASS |
+ |  3:                      2*3+5 | Expected:      11 | Got:      11 |  PASS |
+ |  4:                    2*(3+5) | Expected:      16 | Got:      16 |  PASS |
+ |  5:                      2^2^3 | Expected:     256 | Got:     256 |  PASS |
+ |  6:                    2*2^2*2 | Expected:      16 | Got:      16 |  PASS |
+ |  7:                (2*2)^(2*2) | Expected:     256 | Got:     256 |  PASS |
+ |  8:                     2^2*10 | Expected:      40 | Got:      40 |  PASS |
+ |  9:                       1--1 | Expected:       2 | Got:       2 |  PASS |
+ | 10:               1*2^2+3/4^-1 | Expected:      16 | Got:      16 |  PASS |
+ | 11:                (-4*-4+4^2) | Expected:      32 | Got:      32 |  PASS |
+ | 12:         ((-4*-4+4^2)-32+1) | Expected:       1 | Got:       1 |  PASS |
+ | 13:       -(-1--(-(-10--100))) | Expected:      91 | Got:      91 |  PASS |
+ | 14:                          e | Expected: 2.71828 | Got: 2.71828 |  PASS |
+ | 15:                         pi | Expected: 3.14159 | Got: 3.14159 |  PASS |
+ | 16:                       e^pi | Expected: 23.1407 | Got: 23.1407 |  PASS |
+ | 17:                  log10(10) | Expected:       1 | Got:       1 |  PASS |
+ | 18:            sin(pi)+cos(pi) | Expected:      -1 | Got:      -1 |  PASS |
+ | 19:                   log(e^e) | Expected: 2.71828 | Got: 2.71828 |  PASS |
+ | 20: sin(pi/2)+cos(0)+tan(pi/4) | Expected:       3 | Got:       3 |  PASS |
+ =============================================================================
+ 
diff --git a/doc/source/lab3.rst b/doc/source/lab3.rst
index f05e22472dca41fa0431a51d43b33a2a6431dfbb..13ee4f9ef8080063a621442b4472ba4378974d71 100644
--- a/doc/source/lab3.rst
+++ b/doc/source/lab3.rst
@@ -42,3 +42,26 @@ Hand in the following
 
 Demonstrate your solution to your lab assistant during a laboratory session.
 Send an e-mail (one e-mail per group) with your modified code to the same assistant, put TDDD55, assignment number and your LiU logins in the e-mail subject line.
+
+Getting Started
+---------------
+In this lab you will be working with a quite large codebase.
+Documentation concerning this codebase is available under skeleton at the left side in the tab tab "The Skeleton".
+It is recommended that you start by implementing the different rules for expressions.
+A test program is available at `./test/expression_test.prog`.
+However, it might be useful to write your own program and test simple expressions on a step by step basis.
+To run the compiler on your own program, named for instance myProgram.prog execute::
+ ./compiler ./test/myProgram.prog
+If you want to run the program with debugging information you may run::
+ ./compiler -d ./test/myProgram.prog
+See the different files in the test folders for examples on how to write programs in this language.
+
+Troubleshooting
+---------------
+Make sure that you have checked all places in parser.y with the phrase "Your Code Here".
+Once you have done so you can execute the following sequence of commands to check your compiler::
+  ./compiler ./test/test.prog > output.txt
+  diff -y ./output.txt ../traces/trace-lab3.txt
+Using this commands you will get a side by side comparision of your own output and a trace.
+Take note that the memory addresses might differ for some entries, this is ok.
+ 
diff --git a/doc/source/lab4.rst b/doc/source/lab4.rst
index 1a677438de7ce074eadc97cf5da2c55011de7b81..b4338749f4cbff3d7c9634cf6c7ad6d10b94a33f 100644
--- a/doc/source/lab4.rst
+++ b/doc/source/lab4.rst
@@ -26,3 +26,15 @@ Questions
    For example, assigning a constant to a variable causes two quads to be generated, where one would have been enough.
    There are a number of other situations where equally bad code is generated.
    Suggest at least one way of eliminating most of the bad code that is generated.
+
+Testing your solution
+---------------------
+To test your solution you may run the code-test.sh script located in the lab3-4 folder.
+You can run this script using the following command::
+  bash ./codegen-test.sh
+However, it might be wise to employ a step by step strategy.
+Hence, similar to Lab III you may write your own test program and test it as you add new features to the backend.
+Assuming you have written your own program you may test this program by invoking the compiler in the following way::
+  ./compiler -c ./test/myProgram.prog > myProgram.c
+  gcc -g -o myProgram myProgram.c -lm
+  ./myProgram
diff --git a/lab1/Makefile.dependencies b/lab1/Makefile.dependencies
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..eac438c367e7a76d3ed99980c597f834ad2e2f1c 100644
--- a/lab1/Makefile.dependencies
+++ b/lab1/Makefile.dependencies
@@ -0,0 +1,2 @@
+scanner.o: scanner.cc scanner.h
+main.o: main.cc scanner.h
diff --git a/lab1/scanner.h b/lab1/scanner.h
index c4056548f08d0f467b20f7cdb2244d898c8b3a22..79eade2e1883e3cc9896a67030657f0c392cd5bd 100644
--- a/lab1/scanner.h
+++ b/lab1/scanner.h
@@ -1,28 +1,30 @@
-#define	FUNCTION	258
-#define	ID	259
-#define	DECLARE	260
-#define	ARRAY	261
-#define	INTEGER	262
-#define	OF	263
-#define	REAL	264
-#define	XBEGIN	265
-#define	XEND	266
-#define	IF	267
-#define	THEN	268
-#define	ELSE	269
-#define	WHILE	270
-#define	DO	271
-#define	ASSIGN	272
-#define	RETURN	273
-#define	GE	274
-#define	LE	275
-#define	EQ	276
-#define	NE	277
-#define	TRUE	278
-#define	FALSE	279
-#define	PROGRAM	280
-#define	ELSEIF	281
-#define	NOT	282
-#define	AND	283
-#define	OR	284
-#define	UMINUS	285
+#define FUNCTION 258
+#define ID       259
+#define DECLARE  260
+#define ARRAY    261
+#define INTEGER  262
+#define OF       263
+#define REAL     264
+#define XBEGIN   265
+#define XEND     266
+#define IF       267
+#define THEN     268
+#define ELSE     269
+#define WHILE    270
+#define DO       271
+#define ASSIGN   272
+#define RETURN   273
+#define GE       274
+#define LE       275
+#define EQ       276
+#define NE       277
+#define TRUE     278
+#define FALSE    279
+#define PROGRAM  280
+#define ELSEIF   281
+#define NOT      282
+#define AND      283
+#define OR       284
+#define UMINUS   285
+#define true     286
+#define false    287
diff --git a/lab1/scanner.l b/lab1/scanner.l
index 509664b41b6e139a97e67ddbdba309c22860a258..58292667fc3b4d6e89c5a67ed18645745801b1c0 100644
--- a/lab1/scanner.l
+++ b/lab1/scanner.l
@@ -52,7 +52,8 @@ not                                 return NOT;
 "<>"                                return NE;
 array                               return ARRAY;
 of                                  return OF;
-
+true                                return TRUE;
+false                               return FALSE;
 
 
 
diff --git a/lab2/README.md b/lab2/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..444cff414958f40d4a6daae926abc88faf7f6533
--- /dev/null
+++ b/lab2/README.md
@@ -0,0 +1,74 @@
+# Instructions on how to run the test script
+
+This folder contains the code for lab 2. A test script exists to test your implementation. To run this test script, you must execute the following command in the terminal on the IDA Lab Computers.
+
+```bash
+ python3 test.py test.txt --program ./lab2
+ ```
+
+This assumes that you have successfully compiled the project by executing the makefile and *that the program has been configured to read successfully from stdin*.
+
+Furthermore, the test script assumes that the lab has been completed according to the instructions, mistakes might cause the test script to malfunction.
+
+To make the project make sure that you execute: 
+```
+make 
+````
+
+in the command line interface. 
+
+## Notes (Important)
+* The test script assumes that you have Python 3 installed and that you run on the IDA Lab Systems. It is has not been tested on other systems such as MacOS or GNU/Linux.
+
+* Initially the program will just enter an infinite loop. Hence, you will need to modify the program and get the basic scaffolding in place before you can run the test script. Thus, it might be a good idea to test of some of the arthimatic expressions in the terminal before proceeding with the test script.
+
+To avoid inifnite loops when using files from stdin the following code snippet could be helpful.
+Here we specifiy that if we encounter the end of file token we will throw an `ParserEndOfFile` error. 
+
+````c++
+double Parser::<your name of the start expression>() {
+    //Note almost correct C++ but you will need to modify this code in order to make it run corretly. Do not simply just copy paste. 
+    currentToken = scanner.Scan();
+    if (currentToken.type == kEndMark) {
+      throw ParserEndOfFile();
+    }
+    return <name of your expression method>();
+}
+````
+
+This will be cought by the main loop which is configured in the following way: 
+```c++
+int main(void)
+{
+    Parser parser;
+    double val;
+
+    while (true)
+    {
+        try
+        {
+            cout << "Expression: " << flush;
+            /* Implement the parser.Parse method */
+            val = parser.Parse();
+            cout << "Result:     " << val << '\n' << flush;
+        }
+        catch (ScannerError& e)
+        {
+            cerr << e << '\n' << flush;
+            parser.Recover();
+        }
+        catch (ParserError)
+        {
+            parser.Recover();
+        }
+        catch (ParserEndOfFile)
+        {
+            cerr << "End of file\n" << flush;
+            exit(0);
+        }
+    }
+}
+```
+
+Note that the program will terminate if the end of file token is encountered. 
+
diff --git a/lab2/test.py b/lab2/test.py
new file mode 100644
index 0000000000000000000000000000000000000000..9d6259a054636bd5dde156af54ede909fbc1f124
--- /dev/null
+++ b/lab2/test.py
@@ -0,0 +1,131 @@
+#!/usr/bin/python3
+
+'''
+Written by Martin Olivesten in 2023 for TDDD55.
+Full permission to use in anyway with no restrictions. :)
+
+Run: `python3 test.py -h` for usage.
+'''
+
+from subprocess import Popen, PIPE, STDOUT
+from re import search
+from argparse import ArgumentParser as ArgParse
+from dataclasses import dataclass
+from random import randrange
+from io import TextIOWrapper
+from typing import List, Tuple
+
+GREEN = '\x1b[32m'
+YELLOW = '\x1b[33m'
+RED = '\x1b[31m'
+RESET = '\x1b[39m'
+
+PASS = f'{GREEN}PASS{RESET}'
+FAIL = f'{RED}FAIL{RESET}'
+MAYBE = f'{YELLOW}MAYBE{RESET}'
+
+REAL_REGEX = r'-?(\.[0-9]+|[0-9]+(\.[0-9]*)?)([eE][+-]?[0-9]+)?'
+
+dump = ''
+
+
+@dataclass
+class Result():
+    expr: str
+    expected: str
+    got: str
+    outcome: str
+
+
+def parse_tests(file: TextIOWrapper) -> List[Tuple[str, str]]:
+    tests = file.readlines()
+    tests = filter(lambda t: t[0] != '#' and t.strip(), tests)
+    tests = map(lambda t: t.split('='), tests)
+    tests = list(tests)
+    for t in tests:
+        if len(t) != 2:
+            print(f'ERR: Invalid test format: `{", ".join(t).strip()}`.')
+            exit(1)
+
+    tests = map(lambda p: list(map(str.strip, p)), tests)
+    return list(tests)
+
+
+def run_tests(tests: List[Tuple[str, str]], prog: str) -> (List[Result], int):
+    global dump
+    res = []
+    n_err = 0
+    for i, test in enumerate(tests):
+        expr, expected = test
+        p = Popen([prog], stdin=PIPE, stdout=PIPE, stderr=STDOUT)
+        p_out = p.communicate(f'{expr}\n'.encode())[0].decode()
+        m = search(fr'Result:\s*{REAL_REGEX}', p_out)
+
+        if m is None:
+            res.append(Result(expr, expected, 'ERR', FAIL))
+            n_err += 1
+            dump += 'ERR: Could not match for result in output.\n'
+            dump += f'INPUT: {expr}\n'
+            dump += f'OUTPUT:\n{p_out}\n\n'
+            continue
+
+        got = search(REAL_REGEX, m[0])[0]
+
+        outcome = ''
+        s_ans = got if len(got) <= len(expected) else expected
+        l_ans = got if len(got) > len(expected) else expected
+        if got == expected:
+            outcome = PASS
+        elif (len(s_ans) > 1
+              and s_ans.find('.') != -1
+              and (search(s_ans, l_ans)
+                   or search(s_ans[:-1], l_ans[:-1]))):
+            outcome = MAYBE
+        else:
+            outcome = FAIL
+
+        res.append(Result(expr, expected, got, outcome))
+    return (res, n_err)
+
+
+def main(file: TextIOWrapper, prog: str) -> None:
+    global dump
+    tests = parse_tests(open(file, 'r'))
+
+    if len(tests) == 0:
+        print("ERR: No tests to run")
+        exit(1)
+
+    res, n_err = run_tests(tests, prog)
+    expr_len = max(map(lambda r: len(r.expr), res))
+    expect_len = max(map(lambda r: len(r.expected), res))
+    got_len = max(map(lambda r: len(r.got), res))
+    nr_len = len(str(len(res)))
+    bar_len = 35 + expr_len + expect_len + got_len + nr_len
+
+    print('='*bar_len)
+    for i, r in enumerate(res):
+        print(f'| {i:>{nr_len}}: {r.expr:>{expr_len}} | Expected: {r.expected:>{expect_len}} | Got: {r.got:>{got_len}} | {r.outcome:>{5 + len(RED) + len(RESET)}} |')  # noqa: E501
+    print('='*bar_len)
+
+    if n_err:
+        rand_str = ''.join([str(randrange(0, 10)) for _ in range(8)])
+        dump_file = f'./test-{rand_str}-dump.txt'
+        print(f'Writing error outputs to dump file: `{dump_file}`')
+        with open(dump_file, 'w') as f:
+            f.write(dump)
+
+
+if __name__ == '__main__':
+    ap = ArgParse()
+    ap.add_argument(
+        'file',
+        help='Test file to use.'
+    )
+    ap.add_argument(
+        '-p', '--program',
+        default='./lab2',
+        help='Executable to run tests on. Defaults to `./lab2`.'
+    )
+    args = ap.parse_args()
+    main(args.file, args.program)
diff --git a/lab2/test.txt b/lab2/test.txt
new file mode 100644
index 0000000000000000000000000000000000000000..ac1498ad6ff0b4e4900642471661e876f29d67ee
--- /dev/null
+++ b/lab2/test.txt
@@ -0,0 +1,30 @@
+# Format:
+# expression = expected answer
+# '#' and empty lines ignored
+
+# Precedence and associativity
+1+2*3^-4                    = 1.02469
+1+2/3                       = 1.66667
+(1+2)/3                     = 1
+2*3+5                       = 11
+2*(3+5)                     = 16
+2^2^3                       = 256
+2*2^2*2                     = 16
+(2*2)^(2*2)                 = 256
+2^2*10                      = 40
+1--1                        = 2
+1*2^2+3/4^-1                = 16
+(-4*-4+4^2)                 = 32
+((-4*-4+4^2)-32+1)          = 1
+-(-1--(-(-10--100)))        = 91
+
+# Symbolic constants
+e                           = 2.71828
+pi                          = 3.14159
+e^pi                        = 23.1407
+
+# Symbolic functions
+log10(10)                   = 1
+sin(pi)+cos(pi)             = -1
+log(e^e)                    = 2.71828
+sin(pi/2)+cos(0)+tan(pi/4)  = 3
diff --git a/lab3-4/README.md b/lab3-4/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..f26ba1bfa1f1f34491c5a453105fc0fec2416a50
--- /dev/null
+++ b/lab3-4/README.md
@@ -0,0 +1,132 @@
+# Code Skeleton for Lab 3 and Lab 4
+This folder contains the code skeleton that you will be working on during Lab 3 and Lab 4.
+
+## Lab 3
+For Lab 3 two files are of interest, `parser.y` and `scanner.l`.
+
+To start, begin by integrating what you did in lab 1 to the `scanner.l` file.
+Here it is important that you are careful, and that you do not simply copy paste.
+Look at the structure of `scanner.l` and enter your rules s.t you do not remove any includes present in that file.
+
+Following this a good starting point for Lab 3 is to start by implementing support for the different expressions:
+```C
+/* --- Your code here ---
+ *
+ * Insert the expression grammar here
+ * The start symbol of the expression grammar is
+ * expression. This is important since it's used
+ * in a number of other places.
+ *
+ * Make sure that your code creates itor nodes in the
+ * AST wherever necessary and that it only created
+ * trees for expressions with compatible types!
+ */
+
+expression :
+        {
+          cerr << "Expression here" << endl;
+        }
+        ;
+```
+
+Followed by the different rules for the conditions of the language:
+
+```C
+/* --- Your code here ---
+ *
+ * Insert the condition grammar here
+ * The start symbol is condition. It's used
+ * elsewhere, so make sure you get it right.
+ * The boolean constants false and true are represented using the BooleanConstant AST-node.
+ * The other logical relations are subclasses of BinaryRelation. 
+ * See the file ast.hh for the declarations.
+*/
+condition :
+        {
+          cerr << "Condition here" << endl;
+        }
+        ;
+
+/* --- End your code --- */
+```
+
+### Testing Lab 3.
+There is a number of test files in the `test` directory that you may use to check if your parser works as expected.
+
+We also provide traces that you can use to compare the output of your solution to some expected output.
+To do this you can exceute the following sequence of commands.
+To check if you get about the same result for expressions you can run:
+
+```bash
+./compiler ./test/expression_test.prog > my_output.txt
+diff -y my_output.txt ../traces/trace_expression_test.txt
+```
+
+The same procedure can be done for the more advanced test, that is `traces/trace-lab3.txt`
+
+```
+./compiler ./test/test > my_output.txt
+diff -y my_output.txt ../traces/trace-lab3.txt
+```
+
+## Lab 4
+
+In Lab 4 you will work in file `codegen.cc` search for  `/* --- Your code here --- */`'
+to see where you need to introduce your changes.
+
+A good place to start is the function `BinaryGenerateCode`
+
+```C++
+/*
+ *
+ * This function is used to generate code for all kinds of binary
+ * operators and relations. The arguments to the function are the
+ * following:
+ *
+ * q        The QuadsList onto which the generated code is placed.
+ * realop   The quad to generate for the operator if the arguments
+ *          are of type real.
+ * intop    The quad to generate for the operator if the arguments
+ *          are of type integer.
+ * left     The AST for the left-hand side of the operator. The
+ *          value type of this AST must be the same as that of the
+ *          AST for the right-hand side.
+ * right    The AST for the right-hand side of the operator. The
+ *          value type of this AST must be the same as that of the
+ *          AST for the left-hand side.
+ * node     The operator node itself. You probably won't need this
+ *          unless you want to print an error message.
+ * type     If not NULL, this is the type of the result. This is
+ *          used for relations, where the type of the result is
+ *          always integer, even if the operands are real. If this
+ *          parameter is NULL, then the type of the result is the
+ *          same as the type of the operands (the parser needs to
+ *          make sure that the operands have the same type.)
+ *
+ * See the GenerateCode methods for the binary operators for
+ * examples of how this function is used.
+ *
+ */
+
+static VariableInformation *BinaryGenerateCode(QuadsList& q,
+                                               tQuadType realop,
+                                               tQuadType intop,
+                                               ASTNode *left,
+                                               ASTNode *right,
+                                               ASTNode *node,
+                                               TypeInformation *type = NULL)
+{
+  /* --- Your code here --- */
+  return NULL;
+  /* --- End your code --- */
+}
+```
+
+
+### Testing Lab 4
+In order to test Lab 4, there exists a test script.
+For more details see the README in the test folder.
+
+
+## Other notes
+For more exhaustive documentation see [The Lab Skeleton Documentation](https://www.ida.liu.se/~TDDD55/laboratories/instructions/_static/skeleton.pdf)
diff --git a/lab3-4/codegen-test.sh b/lab3-4/codegen-test.sh
index 4c4aa3aa0236dc9dc6cbd67fc113cd876cf8c10c..c99555595f0f9502f03cf964d569f205ba5dae27 100644
--- a/lab3-4/codegen-test.sh
+++ b/lab3-4/codegen-test.sh
@@ -17,7 +17,7 @@ fi
 echo "Frontend OK"
 echo "Translating to C-Code..."
 
-gcc expression_test.c -o  expression_test -lm
+gcc expression_test.c -o  expression_test -lm -Wno-int-conversion
 
 if [ $? -eq 0 ]; then
     echo "C-Code-Compilation-OK"
@@ -67,7 +67,7 @@ fi
 echo "Frontend OK"
 echo "Translating to C-Code..."
 
-gcc factorial_test.c -o  factorial_test -lm
+gcc factorial_test.c -o  factorial_test -lm -Wno-int-conversion
 
 if [ $? -eq 0 ]; then
     echo "C-Code-Compilation-OK"
@@ -117,7 +117,7 @@ fi
 echo "Frontend OK"
 echo "Translating to C-Code..."
 
-gcc fibonacci_test.c -o  fibonacci_test -lm
+gcc fibonacci_test.c -o  fibonacci_test -lm -Wno-int-conversion
 
 if [ $? -eq 0 ]; then
     echo "C-Code-Compilation-OK"
@@ -167,7 +167,7 @@ fi
 echo "Frontend OK"
 echo "Translating to C-Code..."
 
-gcc simple_array_test.c -o  simple_array_test -lm
+gcc simple_array_test.c -o  simple_array_test -lm -Wno-int-conversion
 
 if [ $? -eq 0 ]; then
     echo "C-Code-Compilation-OK"
@@ -205,7 +205,6 @@ echo "***********************"
 echo "simple_array_test passed!"
 echo "***********************"
 
-
 #= Simple array =#
 echo "Testing sort_test"
 ./compiler -c ./test/sort_test.prog > sort_test.c
@@ -219,7 +218,7 @@ fi
 echo "Frontend OK"
 echo "Translating to C-Code..."
 
-gcc sort_test.c -o  sort_test -lm
+gcc sort_test.c -o  sort_test -lm -Wno-int-conversion
 
 if [ $? -eq 0 ]; then
     echo "C-Code-Compilation-OK"
diff --git a/lab3-4/parser.y b/lab3-4/parser.y
index b65b7b28541b04972985e3270b3d8a314ddd9e83..4477478224d0b70a614d7030cb3c4541bfd673cc 100644
--- a/lab3-4/parser.y
+++ b/lab3-4/parser.y
@@ -174,15 +174,10 @@ functions   :   functions function
  * Write the function production. Take care to enter and exit
  * scope correctly. You'll need to understand how shift-reduce
  * parsing works and when actions are run to do this.
- *
- * Solutions that rely on shift-time actions will not be
- * acceptable. You should be able to solve the problem
- * using actions at reduce time only.
- *
+ 
  * In lab 4 you also need to generate code for functions after parsing
  * them. Just calling GeneratCode in the function should do the trick.
- */
-
+*/
 function :
         {
           cerr << "Function here" << endl;
@@ -617,8 +612,10 @@ expressionz : expressionz ',' expression
  * Insert the condition grammar here
  * The start symbol is condition. It's used
  * elsewhere, so make sure you get it right.
- */
-
+ * The boolean constants false and true are represented using the BooleanConstant AST-node.
+ * The other logical relations are subclasses of BinaryRelation. 
+ * See the file ast.hh for the declarations.
+*/
 condition :
         {
           cerr << "Condition here" << endl;
diff --git a/lab3-4/scanner.l b/lab3-4/scanner.l
index 245b4ba51df2b2aaa3242bc23609ff41deb0cef9..4af832198ac5a3a9dea7c8bc786193bde3c3930d 100644
--- a/lab3-4/scanner.l
+++ b/lab3-4/scanner.l
@@ -55,7 +55,8 @@ not                                 return NOT;
 "<>"                                return NE;
 array                               return ARRAY;
 of                                  return OF;
-
+true                                return TRUE;
+false                               return FALSE;
 
 
 <<EOF>>                             yyterminate();
diff --git a/traces/trace_expression_test.txt b/traces/trace_expression_test.txt
new file mode 100644
index 0000000000000000000000000000000000000000..537252c83d7971da7f6d8da0ec89d6f82b667f15
--- /dev/null
+++ b/traces/trace_expression_test.txt
@@ -0,0 +1,208 @@
+FunctionInformation @ 0x564ef0e59ed0
+  Tag:     0
+  ID:      main
+  Table:   0
+  Parent:  0 
+  Returns: 0 
+  Parameters: none
+  Locals:
+    0x564ef0e6c9d0 b
+    0x564ef0e6c8c0 a
+
+  Body:  0x564ef0e6e780
+StatementList (statement, preceding)
++-CallStatement (call)
+| +-FunctionCall (function, arguments) [<SymbolInformation @ 0x0>]
+|   +-putline
+|   +-0
++-StatementList (statement, preceding)
+  +-CallStatement (call)
+  | +-FunctionCall (function, arguments) [integer]
+  |   +-putreal
+  |   +-ExpressionList (expression, preceding)
+  |     +-Identifier (b)
+  |     +-0
+  +-StatementList (statement, preceding)
+    +-Assignment (left, right)
+    | +-Identifier (b)
+    | +-Power (left, right) [real]
+    |   +-RealConstant (2) [real]
+    |   +-RealConstant (2) [real]
+    +-StatementList (statement, preceding)
+      +-CallStatement (call)
+      | +-FunctionCall (function, arguments) [<SymbolInformation @ 0x0>]
+      |   +-putline
+      |   +-0
+      +-StatementList (statement, preceding)
+        +-CallStatement (call)
+        | +-FunctionCall (function, arguments) [integer]
+        |   +-putreal
+        |   +-ExpressionList (expression, preceding)
+        |     +-Identifier (b)
+        |     +-0
+        +-StatementList (statement, preceding)
+          +-Assignment (left, right)
+          | +-Identifier (b)
+          | +-Divide (left, right) [real]
+          |   +-RealConstant (2) [real]
+          |   +-RealConstant (2) [real]
+          +-StatementList (statement, preceding)
+            +-CallStatement (call)
+            | +-FunctionCall (function, arguments) [<SymbolInformation @ 0x0>]
+            |   +-putline
+            |   +-0
+            +-StatementList (statement, preceding)
+              +-CallStatement (call)
+              | +-FunctionCall (function, arguments) [integer]
+              |   +-putreal
+              |   +-ExpressionList (expression, preceding)
+              |     +-Identifier (b)
+              |     +-0
+              +-StatementList (statement, preceding)
+                +-Assignment (left, right)
+                | +-Identifier (b)
+                | +-Times (left, right) [real]
+                |   +-RealConstant (2) [real]
+                |   +-RealConstant (2) [real]
+                +-StatementList (statement, preceding)
+                  +-CallStatement (call)
+                  | +-FunctionCall (function, arguments) [<SymbolInformation @ 0x0>]
+                  |   +-putline
+                  |   +-0
+                  +-StatementList (statement, preceding)
+                    +-CallStatement (call)
+                    | +-FunctionCall (function, arguments) [integer]
+                    |   +-putreal
+                    |   +-ExpressionList (expression, preceding)
+                    |     +-Identifier (b)
+                    |     +-0
+                    +-StatementList (statement, preceding)
+                      +-Assignment (left, right)
+                      | +-Identifier (b)
+                      | +-Minus (left, right) [real]
+                      |   +-RealConstant (2) [real]
+                      |   +-RealConstant (2) [real]
+                      +-StatementList (statement, preceding)
+                        +-CallStatement (call)
+                        | +-FunctionCall (function, arguments) [<SymbolInformation @ 0x0>]
+                        |   +-putline
+                        |   +-0
+                        +-StatementList (statement, preceding)
+                          +-CallStatement (call)
+                          | +-FunctionCall (function, arguments) [integer]
+                          |   +-putreal
+                          |   +-ExpressionList (expression, preceding)
+                          |     +-Identifier (b)
+                          |     +-0
+                          +-StatementList (statement, preceding)
+                            +-Assignment (left, right)
+                            | +-Identifier (b)
+                            | +-Plus (left, right) [real]
+                            |   +-RealConstant (1) [real]
+                            |   +-RealConstant (2) [real]
+                            +-StatementList (statement, preceding)
+                              +-CallStatement (call)
+                              | +-FunctionCall (function, arguments) [<SymbolInformation @ 0x0>]
+                              |   +-putline
+                              |   +-0
+                              +-StatementList (statement, preceding)
+                                +-CallStatement (call)
+                                | +-FunctionCall (function, arguments) [integer]
+                                |   +-putint
+                                |   +-ExpressionList (expression, preceding)
+                                |     +-Identifier (a)
+                                |     +-0
+                                +-StatementList (statement, preceding)
+                                  +-Assignment (left, right)
+                                  | +-Identifier (a)
+                                  | +-Power (left, right) [integer]
+                                  |   +-IntegerConstant (2) [integer]
+                                  |   +-IntegerConstant (2) [integer]
+                                  +-StatementList (statement, preceding)
+                                    +-CallStatement (call)
+                                    | +-FunctionCall (function, arguments) [<SymbolInformation @ 0x0>]
+                                    |   +-putline
+                                    |   +-0
+                                    +-StatementList (statement, preceding)
+                                      +-CallStatement (call)
+                                      | +-FunctionCall (function, arguments) [integer]
+                                      |   +-putint
+                                      |   +-ExpressionList (expression, preceding)
+                                      |     +-Identifier (a)
+                                      |     +-0
+                                      +-StatementList (statement, preceding)
+                                        +-Assignment (left, right)
+                                        | +-Identifier (a)
+                                        | +-Divide (left, right) [integer]
+                                        |   +-IntegerConstant (2) [integer]
+                                        |   +-IntegerConstant (2) [integer]
+                                        +-StatementList (statement, preceding)
+                                          +-CallStatement (call)
+                                          | +-FunctionCall (function, arguments) [<SymbolInformation @ 0x0>]
+                                          |   +-putline
+                                          |   +-0
+                                          +-StatementList (statement, preceding)
+                                            +-CallStatement (call)
+                                            | +-FunctionCall (function, arguments) [integer]
+                                            |   +-putint
+                                            |   +-ExpressionList (expression, preceding)
+                                            |     +-Identifier (a)
+                                            |     +-0
+                                            +-StatementList (statement, preceding)
+                                              +-Assignment (left, right)
+                                              | +-Identifier (a)
+                                              | +-Times (left, right) [integer]
+                                              |   +-IntegerConstant (2) [integer]
+                                              |   +-IntegerConstant (2) [integer]
+                                              +-StatementList (statement, preceding)
+                                                +-CallStatement (call)
+                                                | +-FunctionCall (function, arguments) [<SymbolInformation @ 0x0>]
+                                                |   +-putline
+                                                |   +-0
+                                                +-StatementList (statement, preceding)
+                                                  +-CallStatement (call)
+                                                  | +-FunctionCall (function, arguments) [integer]
+                                                  |   +-putint
+                                                  |   +-ExpressionList (expression, preceding)
+                                                  |     +-Identifier (a)
+                                                  |     +-0
+                                                  +-StatementList (statement, preceding)
+                                                    +-Assignment (left, right)
+                                                    | +-Identifier (a)
+                                                    | +-Minus (left, right) [integer]
+                                                    |   +-IntegerConstant (2) [integer]
+                                                    |   +-IntegerConstant (2) [integer]
+                                                    +-StatementList (statement, preceding)
+                                                      +-CallStatement (call)
+                                                      | +-FunctionCall (function, arguments) [<SymbolInformation @ 0x0>]
+                                                      |   +-putline
+                                                      |   +-0
+                                                      +-StatementList (statement, preceding)
+                                                        +-CallStatement (call)
+                                                        | +-FunctionCall (function, arguments) [integer]
+                                                        |   +-putint
+                                                        |   +-ExpressionList (expression, preceding)
+                                                        |     +-Identifier (a)
+                                                        |     +-0
+                                                        +-StatementList (statement, preceding)
+                                                          +-Assignment (left, right)
+                                                          | +-Identifier (a)
+                                                          | +-Plus (left, right) [integer]
+                                                          |   +-IntegerConstant (1) [integer]
+                                                          |   +-IntegerConstant (2) [integer]
+                                                          +-0
+  Quads: 0
+
+-------------------------------------------------------------------------------
+SymbolTable @ 0x564ef0e59f28
+-------------------------------------------------------------------------------
+11	0x564ef0e64320 getint() -> integer
+65	0x564ef0e6c8c0 a : 0x564ef0e5bf80 integer [8]
+66	0x564ef0e6c9d0 b : 0x564ef0e5bff0 real [8] --> 0x564ef0e6c8c0 a
+88	0x564ef0e5bf80 0x564ef0e5bf80 integer [8]
+92	0x564ef0e5c060 putreal(x) -> integer
+481	0x564ef0e5e110 putline() -> no return type
+603	0x564ef0e5bff0 0x564ef0e5bff0 real [8]
+775	0x564ef0e601c0 putint(x) -> integer
+918	0x564ef0e62270 getreal() -> real
+-------------------------------------------------------------------------------