Which one of the following tools generates parser from BNF notation?

2025

Which one of the following tools generates parser from BNF notation?

Answer: B. yaccYacc (Yet Another Compiler-Compiler) is a parser generator tool that creates parsers from BNF-like grammar specifications. It reads the grammar definition and…

  1. A.

    lex

  2. B.

    yacc

  3. C.

    ed

  4. D.

    gdb

Attempted by 317 students.

Show answer & explanation

Correct answer: B

Yacc (Yet Another Compiler-Compiler) is a parser generator tool that creates parsers from BNF-like grammar specifications. It reads the grammar definition and generates C code for a parser. Lex is used for lexical analysis (tokenization), not parsing. Ed is a text editor, and GDB is a debugger; neither generates parsers.

Explore the full course: Iocl Engineers Officers Grade A Paper 2

Loading lesson…