Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

2a-l) True or False: Write a T or F in the blank (9 pts) ___ a) Taking the time

ID: 3822306 • Letter: 2

Question

2a-l) True or False: Write a T or F in the blank (9 pts)

___ a) Taking the time to develop a formal language specification, such as a grammar, makes it easier to build a language processing tool.

___ b) Tabular DFA representations only work for finite languages

___ c) A compiler should be thought of as a series of phases that perform language processing tasks.

___ d) A language is either LL-parsable or LR-parsable but it cannot be both

___ e) A “regular” language is for humans while a “deterministic” is for a computer

___ f) It is possible to write a CFG for C – but we can’t for C++ because CFGs are not OO

___ g) We would need to write different CFG rules to translate C to Assembly rather than Python

___ h) Regular expressions are less expressive/powerful than regular grammars

___ i) Synthesized attributes are for LR parsers while inherited attributes are for LL

Explanation / Answer

a)

Statement :

Taking the time to develop a formal language specification, such as a grammar, makes it easier to build a language processing tool.

The above statement is true.

b)

Statement :

Tabular DFA representations only work for finite languages

The above statement is False.

c)

Statement :

A compiler should be thought of as a series of phases that perform language processing tasks.

The above statement is True.

d)

Statement :

A language is either LL-parsable or LR-parsable but it cannot be both.

The above statement is True.

e)

Statement :

A “regular” language is for humans while a “deterministic” is for a computer.

The above statement is False.

f)

Statement :

It is possible to write a CFG for C – but we can’t for C++ because CFGs are not OO.

g)

Statement :

We would need to write different CFG rules to translate C to Assembly rather than Python.

The above statement is True.

h)

Statement :

Regular expressions are less expressive/powerful than regular grammars.

The above statement is True.

i)

Statement :

Synthesized attributes are for LR parsers while inherited attributes are for LL.

The above statement is True.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote