Question: 3. Regular Expression for Simple Identifiers Consider a programming language which specifies the set of legal identifiers allowed in a valid program as follows: Each

3. Regular Expression for Simple Identifiers

Consider a programming language which specifies the set of legal identifiers allowed in a valid program as follows:

Each identifier start with either a #, , (underscore) or an @.

After the first character, each identifier contains any sequence of lower case alpha- betic characters. There must be at least one such character.

Finally the last character must be a $. Let Lident be the language of all possible legal identifiers. Specify the alphabet, , associ- ated with Lident. Give a Regular Expression which characterizes Lident.

4. Context Free Grammar for Simple Identifiers

Write a Context Free Grammar (using BNF notation) for the Simple Identifiers described in the previous problem.

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!