Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I would be really thankful if you could help me out with the details. I am really confused about this assignment. And please don't copy

I would be really thankful if you could help me out with the details. I am really confused about this assignment. And please don't copy other answers to here.

image text in transcribed

This lex assignment has three parts 1. Write a lex program that replaces each word "space" with a single black ' ', each word "newline" with a newline character, unless the word is preceeded by a ' \ ' in which case the ' \ ' is removed and the word is left as is. 2. Write a lex program that converts the input, a sequence of words separated by whitespace, into the following: For each word: Remove "ab" if it appears before a vowel. For example "Habi, habow abarabe yaboabu?" becomes "Hi, how are you?" Special cases: The following words or phrases are translated into specific words: "wahala" becomes "problem", "how na" becomes "how are you", "dat one na grammar" becomes "too complex "kool tempa" becomes "calm down", "please" is replaced with "abeg", and 'Dis food sweet no be small.' becomes "This meal is delicious." Submit the two .lex files along with a screenshot(s) of sample runs

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine M. Ricardo

1st Edition

0763733148, 978-0763733148

More Books

Students also viewed these Databases questions