Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

[6 points) Write a regular expression for comments of the form / ... /. (1) The comment begins with /* and end with the first

image text in transcribed
[6 points) Write a regular expression for comments of the form / ... /. (1) The comment begins with /* and end with the first / encountered. (2) Optional whitespace can precede the comment or follow the comment, but nothing else. Whitespace consists of spaces and or tabs (lt). Don't include newline ( (3) The text of the comments can include letters or digits, space, tab, underscore... and /. (4) (5) (6) (7) The comment can include / but we don't nest comments. The star of the beginning /* cannot be the star of the ending /. The symbol before the ending */ doesn't have to be whitespace. Inside a regular expression, if you want a star symbol, escape it as since just means Kleene star. (So within the expression, write to mean a slash followed by a star. As an expression, just/ means zero or more slashes Some strings that should fail to match: /* xyz */ */ /* /* xyz ./ */ By rules 1 and 2 By rules 1.2 and 4 By rule 5

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2010 Barcelona Spain September 2010 Proceedings Part 3 Lnai 6323

Authors: Jose L. Balcazar ,Francesco Bonchi ,Aristides Gionis ,Michele Sebag

2010th Edition

3642159389, 978-3642159381

More Books

Students also viewed these Databases questions

Question

3. Define the attributions we use to explain behavior

Answered: 1 week ago