if(a>4) a = a + 4 endif endyou will stop just after you have read upto
if(a>4) aYou expected a "then" but found "a", an ID, and so you knew without reading further that the program could not be syntactically correct. What made you expect a "then"? Your knowledge of EZ, and the part of the code that you have already read told you that
if, (, condition, ), then, statements, endifwe surely had 7 numbers in the stack. So we need to pop off 7 numbers. The number 7 depends only on the generic form of an "if-block" in EZ, and not on the particular program at hand. So we can hardcode this 7 as the second element in the pair entry in table 1 at row 23 column "ID". We have collapsed the 7 pieces into a single "high level" piece, viz, an if-block. We give each high level piece a code number from 0,...,7 (there are 8 high level pieces in EZ). The code for "if-block" is 4, which we see as the first element in the pair. After popping the stack, the new top of the stack reminds us what we were doing before we entered the if-block. table 2 tells us how to fit the "if-block" into that context. After fitting the if-block we still need to go back to step1 to deal with the "ID" that we just read. So this explains briefly the "magic" of the tables. Now let me warn you by saying that I have disregarded certain subtle details in the above bird's eye view. If you feel interested to learn more about compilers, you may like to consult standard texts on compiler design.