In this lecture, we're going to test to see if we did this correctly, this precedence.
So just go to test and see.
We're going to make an expression 50 times 30 plus 20.
So before reordering, we would expect an expression with a left operand of 50 and a write operand of
30 plus 20 with with the expression operator being multiply.
But now that we've implemented reordering, we should see something like this expression.
Plus, with the left operand being 50 times 30 and the right operand being 20.
So that's what we expect from this.
So let's see if it worked.
So just press save and we're going to say make, we're going to load the debugger and we're going to
put a breakpoint.
Just at the end of this function for me, it's line two, seven, eight.
Check which line it is for you.
So parse the dot c27, eight and we're just going to run.
We're going to say print node peak and we can see a plus.
That's a good sign.
We're going to check the expression left.
We see a multiply.
We're going to check the expression left again.
And we see a 50 and a 30.
So we see 5030.
Multiply.
So that's very good sign.
And now we're going to check our rate and we see a 20 so we can see reordering worked successfully.
So congratulations on building the reorder.
There will be a part three B, but we haven't gotten to that point yet because the part three will require
us to check for arrays and stuff like that in regards to the reordering.
So part three will come later on in the course regarding reordering expressions.
So I hope you enjoy that.
That's one of the hardest things in this course.
So now that it's finished, hopefully you can revise that code a little bit.
And if you have any questions, let me know.
I like to think I explained it quite well to you, but of course you do have questions about the reordering.
Just let me know in the Q&A and I'll help you out with that.
I know it can be a bit complicated, so thanks so much for watching how to implement predecessors in
your parser.
So we'll continue working on our paths and now from the next lecture.