Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Use the TINY grammar for your project presentation, answer the following questio

ID: 3835383 • Letter: U

Question

Use the TINY grammar for your project presentation, answer the following
questions:

program -> stmt-seq

stmt->seq -> stmt-seq;stmt | stmt

stmt -> if-stmt|repeat-stmt|assign-     stmt|read-stmt | write-stmt

if-stmt ->if exp then stmt-seq end

     | if exp then stmt-seq else stmt-seq end

repeat-stmt    ->repeat stmt-seq until exp

assign-stmt     -> id:= exp

read-stmt -> read id

write-stmt -> write exp

exp -> simp-exp cop simp-exp                     |simp-exp

cop -> < | =

simp-exp -> simp-exp addop term |term

term -> term mulop factor | factor

Factor     -> (exp) |num |id

(a) Draw the syntax tree for the program: read x; read y; if x=y then write x; repeat
y:= x+1 until x=y ; write y
(b) What is the first and follow set for program, stmt-sequence, simple-exp, and
write-stmt (tabulate your answers)
(c) Use the TINY machine language, write the code to multiply three integers
(d) What does LDA 7, 1(0) mean?

Can you please answer this question separately. this is from the compiler theory subject

Use the TINY grammar for your project presentation, answer the following
questions:

program -> stmt-seq

stmt->seq -> stmt-seq;stmt | stmt

stmt -> if-stmt|repeat-stmt|assign-     stmt|read-stmt | write-stmt

if-stmt ->if exp then stmt-seq end

     | if exp then stmt-seq else stmt-seq end

repeat-stmt    ->repeat stmt-seq until exp

assign-stmt     -> id:= exp

read-stmt -> read id

write-stmt -> write exp

exp -> simp-exp cop simp-exp                     |simp-exp

cop -> < | =

simp-exp -> simp-exp addop term |term

term -> term mulop factor | factor

Factor     -> (exp) |num |id

(a) Draw the syntax tree for the program: read x; read y; if x=y then write x; repeat
y:= x+1 until x=y ; write y
(b) What is the first and follow set for program, stmt-sequence, simple-exp, and
write-stmt (tabulate your answers)
(c) Use the TINY machine language, write the code to multiply three integers
(d) What does LDA 7, 1(0) mean?

Can you please answer this question separately. this is from the compiler theory subject

Explanation / Answer

Great moderators dependably utilize language (sometimes single words, now and again states) which demonstrates where they are in their introduction. These "signposts" make it less demanding for the crowd to:
take after the structure of the introduction
comprehend the speaker all the more effectively
get a thought of the length and substance of the introduction.
We've isolated the expressions and sentences into segments which take after the sensible movement of an all around adjusted introduction.