COMPILER DESIGN

LEXICAL ANALYSIS

CONSTRUCTION OF A LEXICAL ANALYZER

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
RR* can be expressed in which of the forms:
A
R+
B
R-
C
R+ U R-
D
R
Explanation: 

Detailed explanation-1: -RR* can be expressed in which of the forms:a) R+b) R-c) R+ U R-d) RView AnswerAnswer: aExplanation: RR*=R+ as R+ means the occurrence to be at least once.

Detailed explanation-2: -Explanation: RR*=R+ as R+ means the occurrence to be at least once.

Detailed explanation-3: -The Arden’s Theorem is useful for checking the equivalence of two regular expressions as well as in the conversion of DFA to a regular expression. Let us see its use in the conversion of DFA to a regular expression. Following algorithm is used to build the regular expression form given DFA.

Detailed explanation-4: -A regular expression is a string representing a pattern used for matching some portion(s) of a target string. Regular expressions are very general and as a consequence, very complex with many different types of operations represented as special characters, or meta-characters.

Detailed explanation-5: -A regular expression (RE) describes a language. It uses the three regular operations. These are called union/or, concatenation and star.

There is 1 question to complete.