Files:
p6.l- Flex lexical analyzer for substring matching
Brief description:
A Flex-based program that implements a substring matching scanner. The program:
- Asks for a name input
- Takes the first 4 characters of that name
- Scans subsequent input strings to check if they contain those 4 characters as a substring
- Reports whether each input word contains or doesn't contain the substring
Usage:
flex p6.l
gcc lex.yy.c -o p6
./p6Example:
Enter Your Name: John
Enter the string: Johnson
Johnson contains 'John' as substring
The program demonstrates basic pattern matching and string handling using Flex.