Compiler Design
~4 marksLexical analysis, LL/LR parsing, syntax-directed translation, and code optimization.
4 Topics
Lexical Analysis
Lexical analysis is the first phase of a compiler — it reads source characters and produces tokens. GATE tests regular expressions for tokens, DFA construction, and the role of the lexer.
Syntax Analysis — LL & LR Parsing
Syntax analysis (parsing) checks that token sequences conform to the grammar and builds a parse tree. GATE tests FIRST/FOLLOW sets, LL(1) parse tables, and LR parsing (SLR, CLR, LALR).
Semantic Analysis & Intermediate Code Generation
Semantic analysis checks meaning (types, scopes, declarations). Intermediate code generation produces an abstract representation that is easier to optimise and translate to machine code.
Code Optimisation & Code Generation
Code optimisation improves intermediate code without changing semantics. Code generation translates to target machine code. GATE tests common optimisation techniques and their applicability.
Sign in to track your progress across topics.