Question: in C++ Problem 5 (30): Write a program (C++, C#, Java, Python) that parses a file and for each string it finds (strings are separated

in C++
Problem 5 (30): Write a program (C++, C#, Java, Python) that parses a file and for each string it finds (strings are separated by whitespace) outputs the string and which of the above languages it is a member of. If the string is not a member of any, then it outputs 'none'. For organizational reasons, make a boolean function for each of the languages. Please provide appropriate and helpful comments. Example Run: File: test.txt Abcde: Id aAa9: Id 3422222: Num ;: Semicolon while: Id while: Id, while &&: And Beo: none &: none ;asdf: none The languages it is talking about are the following: (a) Id = {wlw is a string beginning with A...Z,.... and followed by any character in the alphabet}. The alphabet is =0...9, A...Z, a...z] (6) Num = {ww contains 0.9}, The alphabet is ={0,...,9). (c) Semicolon = {wlw is the string ':'}, The alphabet is E=;} . (d) And = {w w is the string '&&'}, The alphabet is = {&}. (e) While = {wlw is the string 'while'}, The alphabet is ={w,h,i,1,e}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
