Back to the 2024 paper
Similar questions
Formal Language & Automata TheoryExplain how ambiguity arises in the grammar E \rightarrow E + E \mid E \times E \mid id \mid (E). Remove the ambiguity by rewriting the grammar.20257m Compiler DesignConsider the following grammar: E \rightarrow E+T/T T \rightarrow T*F/F F \rightarrow (E)/id Obtain FIRST and FOLLOW sets of the above grammar.20236m Compiler DesignConsider the following grammar: E \rightarrow E + T | T T \rightarrow T * F | F F \rightarrow (E) | id Determine whether the grammar is SLR(1), clearly stating any shift-reduce or reduce-reduce conflicts.20242m Compiler DesignConsider the following grammar: E \rightarrow E+T/T T \rightarrow T*F/F F \rightarrow (E)/id Construct Predictive Parsing Table of the above grammar.20238m
PreviousConsider the following grammar: E \rightarrow E + T | T T \rightarrow T * F | F F \rightarrow (E) | id Parse the string id + id * id using the constructed SLR(1) table and show the parser actions step-by-step.NextDefine syntax-directed definitions (SDD). Explain the difference between S-attributed and L-attributed definitions. Give an example of each and explain how attributes are evaluated.
AI LearningWeb Platform
Coursify — Personal AI Course Generator
Struggling with a difficult subject or concept? Turn any engineering topic into a structured course with interactive lessons, quizzes, and research-backed explanations.