Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this activity, you will use Flex to build a program that counts the occurrences of the following types of strings in input: Uppercase Letters

In this activity, you will use Flex to build a program that counts the occurrences of the following types of strings in input:

Uppercase Letters eg. A, B

Lowercase Letters eg. c, d

Integer eg. 123, 4

Operators eg. +, -, *, /

Total number of lines

Example

Input:

123a4b56c78DEF+

21Ghi34JK-/22

Output:

Number of lines: 2

Number of Capital letters: 6

Number of Lowercase letters: 5

Number of integers: 7

Number of operators: 3

Noted: To officially terminate your input, press ctrl + d then you will see the output prompted.

For your submission, you should submit your .lex, and a.out file (or your final executable file)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions