COMPILER DESIGN

LEXICAL ANALYSIS

REGULAR EXPRESSIONS AND FINITE AUTOMATA

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
____ is represented by double circle.
A
Initial state
B
Intermediate State
C
Final state
D
Null State
Explanation: 

Detailed explanation-1: -Final state : If the input string is successfully parsed, the automata is expected to be in this state. Final state is represented by double circles. It may have any odd number of arrows pointing to it and even number of arrows pointing out from it.

Detailed explanation-2: -If the FSA is in an accept state and the input is /S (end of sentence) then it returns to the start state, S1, with the output of NN. Source publication.

Detailed explanation-3: -Some finite state machines have a special state called the accepting state. This is indicated by a double circle. The accepting state is reached when a valid string is entered, i.e. the string satisfies the rules for the regular language that it models.

Detailed explanation-4: -Accepting State or Final State-A set of states which the machine may halt in, provided it has no input left, in order to accept the string as part of the language.

Detailed explanation-5: -Trap state in DFA If a transition goes to a state from which it can never escape. Such a state is called a trap state. It is called the dead state. In the above example, q2 is a trap or dead state because it can’t reach the final state.

There is 1 question to complete.