Question: Program a quick scanner that removes all comments and any white spaces from a source file written using a self-created language .Myl file. Myl is

 Program a quick scanner that removes all comments and any white

Program a quick scanner that removes all comments and any white spaces from a source file written using a self-created language ".Myl" file. "Myl" is a programming language very similar to C++ language and all source files written in this language have the extension ".MYL". Comments of this language are the same as C+ comments. Meaning, it has two ways to write comments. The first way is a single line comment by using "//" and the other wav is the multi-lines comment terminate the multi-lines comment. Your quick scanner must be able to determine any unterminated multi-lines comment and quit the program if there are any errors with the "MYL" file, such as a broken multi-line comment e.g. "/* .. " The quick scanner should also be able to remove any unnecessary whitespace, such as "a -bc" to "a-b+c". by using "/*" to start the comment and then to use "*/" to Write a C++ program that takes as an input a .MYL source file and creates a temporary backup file ".BAK" with the same name as the input file. The output file has the same source code cleared from all white spaces and all comments. All code should be given comment on, such as what the purpose of the code is or what the function does

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!