Question

In certain programming languages, comments appear between delimiters such as /# and #. Let C be the language of all valid delimited comment strings. A mem- ber of C must begin with /# and end with #/ but have no intervening #. For simplicity, assume that the alphabet for Cis Σ {a, b, /

Give a regular expression that generates C

0 0
Add a comment Improve this question Transcribed image text
Answer #1

eed te fill 丑1 alo, so, wenne e cl to be catelul teiten it. nt can be just. 1 in Just # L#_Se, I th goto wih at

Add a comment
Know the answer?
Add Answer to:
Give a regular expression that generates C In certain programming languages, comments appear between delimiters such...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • In certain programming languages, comments appear between delimiters such as (# and #). A comment must...

    In certain programming languages, comments appear between delimiters such as (# and #). A comment must begin with (# and end with #). A comment may not contain #) inside the comment. A comment's delimiters must be separate: (##) is a comment, (#) is not. • For simplicity, assume that the alphabet is £ = {a,b,( ), #}. Give a regular expression that accepts comments.

  • Programming Languages Final Exam Name: Question 1 (15 points) Give a regular expression for each of...

    Programming Languages Final Exam Name: Question 1 (15 points) Give a regular expression for each of the following languages over = {0,1,2). 1. All strings that begin with 1 and end with 2. 2. All strings that contain exactly three 1's. For example, "0101012" is valid. 3. All strings in which the digits are non-decreasing. For example, "002" is valid, but "102" is not.

  • (a) Give 2 strings that are members of language specified by the regular expression (0+ 1)∗...

    (a) Give 2 strings that are members of language specified by the regular expression (0+ 1)∗ but are not members of the language specified by 0∗ + 1∗ . Then give 2 strings that are members of both languages. Assume the alphabet is Σ = {0, 1}. (b) For each of the following languages specified by regular expressions, give 2 strings that are members and 2 strings that are not members (a total of 4 strings for each part). Assume...

  • For each of the languages listed below, give a regular expression that generates the lan- guage....

    For each of the languages listed below, give a regular expression that generates the lan- guage. Briefly justify your answer. (a) The set of strings over (a, b such that any a in the string is followed by an odd number of b's. Examples: bbbab E L, but abb f L. (b) The set of strings over fa, b in which there is an a in every even position and the total number of b's is odd, where the first...

  • 1. (Decidable languages) (c) (Prefix of a generated string) A string w is called a prefix...

    1. (Decidable languages) (c) (Prefix of a generated string) A string w is called a prefix of string s if s starts with w. i. Give a regular expression for all strings over alphabet Σ for which w is a prefix. ii. Let L = {(G, w) | G is a CFG, w is a string, and w is a prefix of some string s generated by G}.

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT