Write a Lex program that converts a file to "Pig latin." Specifically, assume the file is a sequence of words (groups of letters) separated by whitespace. Every time you encounter a word: 1. If the...


Write a Lex program that converts a file to "Pig latin." Specifically, assume the file is a sequence of words (groups of letters) separated by whitespace. Every time you encounter a word:


1. If the first letter is a consonant, move it to the end of the word and then add ay.


2. If the first letter is a vowel, just add ay to the end of the word.

All nonletters are copied intact to the output.



May 22, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here