Topic: Compiler Design
Which one of the following tools generates parser from BNF notation?
- A. lex
- B. yacc
- C. ed
- D. gdb
Answer: B. yacc
Explanation: YACC (Yet Another Compiler Compiler) is a tool used to generate an LALR(1) parser from a formal grammar specification written in BNF (Backus-Naur Form). In contrast, 'lex' is used for generating lexical analyzers.