COMPILER DESIGN

LEXICAL ANALYSIS

CONSTRUCTION OF A LEXICAL ANALYZER

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
A ____ is a collection of sentences of finite length all constructed from a finite alphabet of symbols.
A
string
B
word
C
language
D
alphabet
Explanation: 

Detailed explanation-1: -“A language is a collection of sentences of finite length all constructed from a finite alphabet of symbols.In general, if is an alphabet and L is a subset of *, then L is said to be a languageover, or simply a language if is understood.

Detailed explanation-2: -A string is a finite sequence of symbols selected from some alphabet. It is generally denoted as w. For example for alphabet ∑ = 0, 1 w = 010101 is a string.

Detailed explanation-3: -Alphabet: An alphabet is a finite set of symbols denoted by in automata. Alphabets are a set of symbols used to construct a language. Example, 0, 1 is binary alphabet, A…, Z, a… z is the alphabet set for the English language.

Detailed explanation-4: -Finite automata can be used to generate strings in a regular language. A finite automaton for a particular language is “programmed, ‘’ in a way, to generate the strings of a given language through its states and transition functions.

Detailed explanation-5: -In automata theory, a formal language is a set of strings of symbols drawn from a finite alphabet. A formal language can be specified either by a set of rules (such as regular expressions or a context-free grammar) that generates the language, or by a formal machine that accepts (recognizes) the language.

There is 1 question to complete.