Answered step by step
Verified Expert Solution
Question
1 Approved Answer
(20pt) Assume you have a C++ source file which you edit using the BBEdit editor (barebones.com). You need to replace all comments in the /*
(20pt) Assume you have a C++ source file which you edit using the BBEdit editor (barebones.com). You need to replace all comments in the /* */ style that span a single line with the same comment in the // ... style. This can be done using the Find/Replace Grep feature. You are required to provide the two regular expressions corresponding to Find and Replace boxes. Comments spanning more than one line should not be affected. You are not required to handle strings containing comment-like strings, that is, such pseudo-comments would be replaced as well. You will need to use the backreference feature: subpatterns captured by Find can be identified by enclosing them in parentheses, (...), and then used in Replace with \1,\2,... in the order they appear in Find. (20pt) Assume you have a C++ source file which you edit using the BBEdit editor (barebones.com). You need to replace all comments in the /* */ style that span a single line with the same comment in the // ... style. This can be done using the Find/Replace Grep feature. You are required to provide the two regular expressions corresponding to Find and Replace boxes. Comments spanning more than one line should not be affected. You are not required to handle strings containing comment-like strings, that is, such pseudo-comments would be replaced as well. You will need to use the backreference feature: subpatterns captured by Find can be identified by enclosing them in parentheses, (...), and then used in Replace with \1,\2,... in the order they appear in Find
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started