diff --git a/lab3-4/README.md b/lab3-4/README.md index c6dda4ee8bd54e75519a0e6927f2517d01bef923..fbb110a2aa7e65c4491ca01917d4d07f4c855deb 100644 --- a/lab3-4/README.md +++ b/lab3-4/README.md @@ -8,28 +8,7 @@ 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. -### 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 -``` - -A good starting point for Lab 3 is to start by implementing support for the different expressions: +Following this a good starting point for Lab 3 is to start by implementing support for the different expressions: ```C /* --- Your code here --- * @@ -71,6 +50,24 @@ condition : /* --- 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