Question: I need help with the following program for a Programming Languages class. This should be done in Lex. Write a Lex input file that will

I need help with the following program for a Programming Languages class. This should be done in Lex. Write a Lex input file that will produce a program that counts characters, words, and lines in a text file and reports the counts. Define a word to be any sequence of letters and/or digits, without punctuation or spaces. Punctuation and white space do not count as words. A sample output of the program is given:

Number of characters: 35747

Number of words: 5978

Number of lines: 1506

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!