Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I / * * * * * * * * * * * * * * * * * * * * * * *
I
Name: Vishal Murugavel NetID: vm
Course: CSE
Lab: Lexical Analyzer
Purpose of File: Contains the
This is the file that you should modify for Lab
option noyywrap
#include "lexer.h
global variable to hold current line number being read
int linenumber ;
Data Values
return DATE;
"Laboratoryconfirmed case" return LABORATORY;
"Probable Case" return PROBABLE;
"Male" return MALE;
"Female" return FEMALE;
"Other" return OTHER;
Years" return AGEX;
Years" return AGEX;
Years" return AGEX;
Years" return AGEX;
Years" return AGEX;
Years" return AGEX;
Years" return AGEX;
Years" return AGEX;
"HispanicLatino return HISPANIC;
"American Indian Alaska Native, NonHispanic" return NATIVEAMERICAN;
"Asian, NonHispanic" return ASIAN;
"Black, NonHispanic" return BLACK;
"Native Hawaiian Other Pacific Islander, NonHispanic" return PACIFICISLANDER;
wWhite NonHispanic" return WHITE;
"MultipleOther NonHispanic" return MULTIPLEOTHER;
Generic Data Values
"Yes" return YES;
No return NO;
"Unknown" return UNKNOWNVALUE;
"Missing" return MISSING;
Punctuation
return SEPARATOR;
Eat any whitespace, will need to be modified to count lines
tr
linenumber; nop
Found an unknown character
return UNKNOWNVALUE;
Recognize end of file
return EOFTOKEN;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started