Answered step by step
Verified Expert Solution
Link Copied!

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

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

Beyond Big Data Using Social MDM To Drive Deep Customer Insight

Authors: Martin Oberhofer, Eberhard Hechler

1st Edition

0133509796, 9780133509793

More Books

Students also viewed these Databases questions