Exam 3: Compiler Construction and Parsing Algorithms

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

Consider the following grammar: S ? FR R ? S | ? F ? id In the predictive parser table, M, of the grammar the entries M[S, id] and M[R, $]respectively.

(Multiple Choice)
4.9/5
(41)

Consider the following expression grammar. The seman-tic rules for expressioncalculation are stated next to each grammar production. E ? number E.val = number. val | E '+' E E(1).val = E(2).val + E(3).val | E '×' E E(1).val = E(2).val × E(3).val The above grammar and the semantic rules are fed to a yacc tool (which is an LALR (1)parser generator) for parsing and evaluating arithmetic expressions. Which one of thefollowing is true about the action of yacc for the given grammar?

(Multiple Choice)
4.8/5
(31)

Debugger is a program that

(Multiple Choice)
4.8/5
(32)

A canonical set of items is given below S --> L. > R Q --> R. On input symbol < the set has

(Multiple Choice)
4.9/5
(44)
Showing 21 - 24 of 24
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)