Question
list -> list + digit list -> list digit list -> digit digit -> 0|1|2|3|4|5|6|7|8|9 1. Use the grammar above, follow derivation on chapter 2
list -> list + digit list -> list digit list -> digit digit -> 0|1|2|3|4|5|6|7|8|9
1. Use the grammar above, follow derivation on chapter 2 slide 15 to apply the production to following expression 3-1+9, 4+2-3+9
2. How to modify the grammar above to right associative? Use the modified grammar to draw the parse tree for 4+2-3+9
3. Use the grammar on compiler design slide 25 to draw the parse tree for 3-2*8+5/3, and 3-2*(4+7)/5
4. Transform the following expressions to postfix notation (4+2-9)/3+7*4, ((2+8/3)+4)*3-9
5. Use the Syntax-directed definition on compiler design slide 36 to translate (4+2-9)/3+7*4 to postfix notation. Show the parse tree with synthesized attributes
Links to all pictures of slides are at the bottom
(slide 36= https://ibb.co/iTxxLb )
(slide 25= https://ibb.co/c7VWVb)
(slide 15= https://ibb.co/eaK3bG )
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started