Question: 15. Write a program that lexically analyzes (scans)1 a text file whose name is input from the user. The lexical analysis should find and count

 15. Write a program that lexically analyzes (scans)1 a text file

whose name is input from the user. The lexical analysis should find

15. Write a program that lexically analyzes (scans)1 a text file whose name is input from the user. The lexical analysis should find and count every word contained in the file. The words and corresponding counts should be displayed in lexicographic order using the format count word XXXXX total count of XXXX words Sample input file (Assignment6.txt Though I speak with the tongues of men and of angels, and have not charity I am become as sounding brass, or a tinkling cymbal. And though I have the gift of prophecy, and understand all mysteries, and all knowledge; and though I have all faith, so that I could remove mountains, and have not charity, I am nothing And though I bestow all my goods to feed the poor, and though I give my body to be burned, and have not charity, it profiteth me nothing. Charity suffereth long, and is kind; charity envieth not: charity vaunteth not itself, is not puffed up, Doth not behave itself unseemly, seeketh not her own, is not easily provoked thinketh no evil; Reioiceth, not in iniquity, but xeioiceth in the truth; Beareth all things, believeth all things, hopeth all things, endureth all things. Charity never faileth but whether there be prophecies, they shall fail; whether there be tongues, they shall cease; whether there be knowledge, it shall vanish away. For we know in part, and we prophesy in part. But when that which is perfect is come, then that which is in part shall be When I was a child, I spake as a child, I understood as a child, I thought as For now we see through a glass, darkly; but then face to face: now I know in And now abideth faith, hope, charity, these three; but the greatest of these done away a child: but when I became a man, I put away childish things part; but then shall I know even as also I am known is charity

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!