Question: Question 1 In the programming language Pascal, an identifier is a sequence of Roman letters and Arabic digits. An identifier always starts with a letter.

 Question 1 In the programming language Pascal, an identifier is a

Question 1 In the programming language Pascal, an identifier is a sequence of Roman letters and Arabic digits. An identifier always starts with a letter. The shortest identifier is a single character. (a) Give a regular expression for Pascal's representation of identifiers, making use ofletter [5\%] and digit as defined below. lc=(abcdefghijklmnopqrstuvwxyz) uc =(ABCDEFGHIJKLMNOPQRSTUVWXYZ) letter =(lcuc) digit =(0123456789) (b) Translate the regular expression given in your answer to (a) into a Non-deterministic [7\%] Finite Automaton (NFA), showing your working. (c) Translate the Non-deterministic Finite Automaton given in your answer to (b) into a [8\%] Deterministic Finite Automaton (DFA), showing your working. (d) Using your answer to part (b) of this question, give a state-transition lookup-table for [5\%] parsing identifiers. Note: Do not unpack or expand the definitions of digit and letter in your answers to (a), (b), (c) and (d)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!