Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Below is a grammar for floating-point literals. Note, only one token is being defined here: float. The other non-terminals simply help define float's structure. float::digits

image text in transcribed

image text in transcribed

Below is a grammar for floating-point literals. Note, only one token is being defined here: float. The other non-terminals simply help define float's structure. float::digits | digits"[digits] digits ::: digit(digit) digit:::: "0" I "1" I "2" I "3" I "4" I "S" I "6" I "7" I "8" | "9" Recall: [x) means "X is optional" (ie, x appears 0 or 1 times) x3 means "a sequence of zero or more x's Examples of lexemes that can be generated using this grammar: 23. 3.123 Examples of strings that cannot be generated using this grammar 1.2.3 123 English description of a floating-point literal: the string must have exactly one decimal point and must have at least one digit, either before or after the decimal place. Instructions Draw a state diagram that recognizes floating point lexemes You must have a state labeled start. You must have at least one state that has a double border. A double bordered state is an accepting state. If the state machine is in an accepting state after processing a string, it accepts/recognizes the lexeme. If the state machine ends in any other state, then it does not accept/recognize the string as a lexeme. For example, in Figure 4.1 of the text id, int, and unknown are accepting states. The others are not

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

Intelligent Information And Database Systems 6th Asian Conference Aciids 2014 Bangkok Thailand April 7 9 2014 Proceedings Part I 9 2014 Proceedings Part 1 Lnai 8397

Authors: Ngoc-Thanh Nguyen ,Boonwat Attachoo ,Bogdan Trawinski ,Kulwadee Somboonviwat

2014th Edition

3319054759, 978-3319054759

More Books

Students also viewed these Databases questions

Question

8. Do the organizations fringe benefits reflect diversity?

Answered: 1 week ago