Question 11494 – APPSC-2012-DL CA
January 17, 2024Question 17345 – NTA UGC NET Dec 2023 Paper-2
January 17, 2024Question 10098 –
The language L, defined by the following grammar allows use of real or integer data in expressions and assignment statements.
(assign-stmt):: = (LHS):= (E) (E) :: = (E) + (T)|(T) (T) :: = (T) * (V)|(V) (V) :: = id|((E)) (LHS) :: = id
It is required to convert expression and assignment strings of L into postfix strings that use the type-specific operators (+, i), (+, r), (*, i), (*, r), (:=, i) and (:=,r).
Write a syntax directed translation scheme to convert expression and assignment strings into the post-fix form. You may assume that the name and type of a variable can be obtained by making the function calls ‘give-type (id)’ and ‘give-name (id)’ respectively.
Correct Answer: A
Theory Explanation.
Subscribe
Login
0 Comments