Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Compiler Design Please help me with this lexical analysis In C Using FInite automata and a driver. With file test scanner , main, scanner, token.h
Compiler Design
Please help me with this lexical analysis In C
Using FInite automata and a driver.
With file test scanner , main, scanner, token.h
- All case sensitive
- Each scanner error should display "Scanner Error:" followed by details including the line number ff available
- Alphabet
- all English letters (upper and lower), digits, plus the extra characters as seen below, plus WS
- No other characters allowed and they should generate errors
- Identifiers
- begin with a lower case letter and
- continue with any number of letters or underscores
- you may assume no identifier is longer than 8 characters
- Keywords (reserved, suggested individual tokens)
start stop loop void var return scan out program if then let
- Operators and delimiters group.
= < > : + - * / % . ( ) , { } ; [ ]
- Integers
- any sequence of decimal digits, no sign, no decimal point
- you may assume no number longer than 8 characters
- Comments start with $ and end with $
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