Moji added a discussion to the group CS606 Compiler Construction

Moji added a discussion to the group CS606 Compiler Construction
Thumbnail

CS606 Assignment No 1 2020

Let Context- free syntax is specified with a grammar G=(S,N,T,P),Where• S is the start symbol• N is a set of non-terminal symbols• T is set of terminal symbols or words• P is a set of productions or rewrite rulesConsider the following Context-Free Grammar1. goal? expression2. expression? expression op term3. | term4. Term? number5. | id6. Op? +7. |-8. |*9. |^For the above CFG,S = goalT = { number, id, +, -,*, ^}N = { goal, expr, term, op}P = { 1, 2, 3, 4, 5, 6, 7, 8, 9}Derive the expression X *2-Y^3+Z [10 Marks]Construct a parse tree for expression X *2-Y^3+Z [10 Marks]See More


from Latest Activity on Virtual University of Pakistan https://ift.tt/37dWgnk

0 comments:

Post a Comment