Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please directly give me the results of these questions. (h) (2 points) Select the CORRECT statement A. A grammar is ambiguous if it causes shift-reduce

Please directly give me the results of these questions. image text in transcribed
(h) (2 points) Select the CORRECT statement A. A grammar is ambiguous if it causes shift-reduce conflict. B. A grammar is ambiguous if we can construct two or more parse trees for the same sentence C. A grammar is ambiguous if it causes reduce-reduce conflict D. A and B E. A, B, and C. (1) (2 points) Select the CORRECT statement in Backus-Naur Form (BNF) grammar A. Given a start the language. B. Given a string bymbol and a language grammar, we can construct a random sestence in g and a language grammar, we can determine If the string is a setence in the language. C. A grammar can be used for language generation or recognition D. A and B. E. A, B, and C. G) (2 points) Consider the following EBNF grammar: - Which the following sentence is accepted by the above grammar? C. (O) D. A and B. E. A, B, and C. (k) (2 points) Consider the code in C programning language: int i-20; How many lexemes in the code? C. 7 D. 8 (1) (2 points) Consider the code in C programming language: i 20 1; How many distinct tokens are produced from the code? B. 4 E. None of the above. A. A lexical analyzer is a pattern matcher for character strings B. A lexical analyzer identifies substrings of the source program that belong together. C. A lexical analyzer is a front-end for the parser. D. A and B E. A, B, and C ) (2 points) Select CORRECT statements

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Linked Data A Geographic Perspective

Authors: Glen Hart, Catherine Dolbear

1st Edition

1000218910, 9781000218916

More Books

Students also viewed these Databases questions

Question

Convert 2.155 m/s into kilometers/hour.

Answered: 1 week ago

Question

List the advantages and disadvantages of the pay programs. page 536

Answered: 1 week ago