Automata Theory Questions and Answers – YACC Parser Generator

This set of Automata Theory Multiple Choice Questions & Answers (MCQs) focuses on “YACC Parser Generator”.

1. YACC is a computer program for ______ operation system.
a) Windows
b) DOS
c) Unix
d) openSUSE
View Answer

Answer: c
Explanation: YACC technique is a computer code for the Unix operating system. It is a LALR parser generator, generating a parser, the part of a compiler that tries to make syntactic sense of the source code.

2. YACC is an acronym for:
a) Yes Another Compile Compiler
b) Yet Another Compile Compiler
c) Yet Another Compiler Compiler
d) Yes Another Compiler Compiler
View Answer

Answer: c
Explanation: YACC stands for ‘Yet another compiler compiler’ and it was developed by Stephen Johnson in B programming language later translated to C.

3. The YACC takes C code as input and outputs_________
a) Top down parsers
b) Bottom up parsers
c) Machine code
d) None of the mentioned
View Answer

Answer: b
Explanation: The YACC takes C code as input and produces shift reduce parsers in C,also known as Bottom up parsers which execute C snippets with the associated rule.
advertisement
advertisement

4. The _______ table is created by YACC.
a) LALR parsing
b) LL parsing
c) GLR parsing
d) None of the mentioned
View Answer

Answer: a
Explanation: LALR parser generator is software tool that reads a BNF grammar and creates a LALR parser which is capable of parsing files written in programming language identified by BNF grammar.

5. The original YACC as written in __________ language
a) R programming language
b) C programming language
c) B programming language
d) None of the mentioned
View Answer

Answer: c
Explanation: Stephen Johnson wrote this parser generator in B programming language which was further modified and written in C, JAVA, Python, etc.

6. Which of the following is false for B programming language?
a) Typeless
b) Influenced by PL/I
c) Designed by Dennis Ritchie
d) None of the mentioned
View Answer

Answer: d
Explanation: B was programming language designed by Dennis Ritchie and Ken Thompson for recursive, non numeric, system and language softwares. It was a typeless language, everything is a word.

7. Which of the following is false for BNF?
a) BNF means Backus Naur Form
b) It is a normal form used in Data base normalization
c) It is a notation technique for context free grammar
d) None of the mentioned
View Answer

Answer: b
Explanation: The normal form used in Data base normalization is BCNF i.e. Boyce Codd normal form and NOT Backus Naur Form.
advertisement

8. State true or false:
Statement: BNF is a metasyntax used to express CFG
a) True
b) False
View Answer

Answer: a
Explanation: BNF is a metasyntax used to express context free grammar, moreover a formal way to express the language.

9. Which of the following are not used to express CFG?
a) BNF
b) EBNF, ABNF
c) Van Wijngaarden form
d) None of the mentioned
View Answer

Answer: d
Explanation: W grammar or van Wijngaarden form is used to define potentially infinite context free grammars in a finite number of rules. It is an example of larger class of affix grammars. This technique was used to define the P/L Algol 68.
advertisement

10. Which of the following version of Unix came up with YACC first?
a) V3
b) V5
c) CB UNIX
d) Unix-RT
View Answer

Answer: a
Explanation: Yacc appeared in version 3 of unix, though full description was published by 1975.

Sanfoundry Global Education & Learning Series – Automata Theory.
To practice all areas of Automata Theory, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.