Design a lexical analyzer using transition diagram that recognizes:
Show the transition diagram and write pseudocode for the nextToken() function.
a) Type checking: Static vs Dynamic type checking with examples b) Synthesized vs Inherited attributes with expression evaluation example
Identify loop invariant code that can be moved out of the loop, if any.
Apply these optimizations to the following assembly code:
MOV R0, a
MOV b, R0
MOV R0, b
ADD R0, R0, #0
MUL R0, R0, #2
MOV R1, #10
ADD R1, R1, #5
MOV R2, #0
ADD R2, R2, R1
Share this link via
Or copy link