Tag archive for "statements"
Processing statements is more simpler than processing expressions. Consequently, majority of the code is generated by expressions and not by statements themselves. Statements in Turbo Pascal are organized into an object that contains methods for each Pascal statement and statement intermediate code – offset to the intermediate code subrutine for each statement.
This procedure processes blocks of statements between two tokens. It is used to process begin – end and Repeat – end blocks.
This procedure processes Asm – end blocks of assembler instructions. It creates a temporary symbol table for assembler identifiers, indirectly checks for end token and processes assembler instructions.
This procedure processes assignment statements and procedure/function calls. It first checks for variable expression, then if the token is procedure or function it generates code to call procedure (or function), for functions it processes qualifiers in a loop and stops if it finds assignment token.