Question: HERE IS WHAT I HAVE SO FAR: Ive tried getting help from my professor but the answer i keep getting is i have two transitions

 HERE IS WHAT I HAVE SO FAR: Ive tried getting help

from my professor but the answer i keep getting is i have

HERE IS WHAT I HAVE SO FAR:

Ive tried getting help from my professor but the answer i keep getting is i have two transitions out of my NEXT_WHOLE state at the bottom left? I cant wrap my head around how i can get rid of that? Like if i had "5e5f" i would transition to the floating-suffix state with an "f" however if it was "5e5L" i would have to go to the floating-suffix state with an "L". So there has to be 2 transitions in my mind but thats illegal. Can you please take a look at what i have and red pen some lines in it via screen snip or whatever is easier for you. Thank you for your time and help. P.S. ive seen linear states for these but i need to use this "web" layout as it was started above in the question. Thank you.

two transitions out of my NEXT_WHOLE state at the bottom left? I

C2A5E3 (5 points - Diagram only - No program required) Create the state diagram described in this exercise in 8.5"x11" portrait orientation and put it in a PDF file named C2A5E3_StateDiagram.pdf. Using an application such as Word, Visio, etc. to create it is preferred, but a neat hand-drawn diagram is also acceptable. Regardless of how the diagram is created, significant credit will be deducted if I consider it to be sloppy or hard to read. Your state diagram must analyze the contents of an arbitrary string of characters to determine if its syntax is that of a "decimal floating literal" and if so, its type. A formal syntax definition is provided later but a few examples that do and do not conform to that definition are provided below for your consideration. One thing that often surprises students is that any expression starting with a plus or minus sign is never a numeric literal of any kind. YES: 1.2 1.2e0 12e+5 16-1 0.0 Oe0 5E5 .02E08 6e6f 6e6L 6.F 6.e-25F NO: +1.2 -1.20 1.2e+ 1E-.1 00 +0e0 535 e08 -6e6f 6e6+L 6F 6.e-2.5F The first part of the required state diagram is provided below and must be present in your finished diagram, with the ??? transitions at the bottom connected to what you add. A state machine is often implemented as a separate function and in this diagram the word ENTER represents the function's entry point. Transitions to the following four identifiers represent returns from the function and have the indicated meanings: FAIL - string did not represent a decimal floating literal. FLOAT - string represented a type float decimal floating literal. DOUBLE string represented a type double decimal floating literal. L_DOUBLE string represented a type long double decimal floating literal. Additional Requirements: 1. A correct diagram has exactly 9 states. Function entry points and returns do not count as states. 2. State names must meaningfully indicate the current status of the string porse and must be legal identifiers that you will use unaltered in your state machine code in the next exercise. 3. Use identifiers FAIL, FLOAT, DOUBLE, and LLDOUBLE as return indicators only - never as state names. 4. The string's next character is available upon entering each state and all transitions out of that state must be based solely upon that character. Looking back or looking ahead is prohibited. 5. More than one default transition out of any state makes no logical sense and is always wrong. 6. Because the state diagram is processing a string and not a file do not label anything as EOF. 7. Do not attempt to determine the numeric value of a floating literal. ENTER FAIL FAIL START point NO WHOLE digit FAIL digiti FAIL DOUBLE end point WHOLE FRACT digit Ele digit Ele F/f LA ??? ??? 709 792 ENTER lo FAIL START FAIL DIGIT POINT FAIL DIGIT WHOLE NO WHOLE POINT DIGIT Ele DOUBLE EXPONENT FRACT Ele DIGIT FAIL +- FAIL SIGN DIGIT F/ 41 NEXT WHOLE F/f WHOLE FLOAT DIGIT L_DOUBLE FAIL FLOAT FAIL FAIL WHOLE_ LONG LI DOUBLE C2A5E3 (5 points - Diagram only - No program required) Create the state diagram described in this exercise in 8.5"x11" portrait orientation and put it in a PDF file named C2A5E3_StateDiagram.pdf. Using an application such as Word, Visio, etc. to create it is preferred, but a neat hand-drawn diagram is also acceptable. Regardless of how the diagram is created, significant credit will be deducted if I consider it to be sloppy or hard to read. Your state diagram must analyze the contents of an arbitrary string of characters to determine if its syntax is that of a "decimal floating literal" and if so, its type. A formal syntax definition is provided later but a few examples that do and do not conform to that definition are provided below for your consideration. One thing that often surprises students is that any expression starting with a plus or minus sign is never a numeric literal of any kind. YES: 1.2 1.2e0 12e+5 16-1 0.0 Oe0 5E5 .02E08 6e6f 6e6L 6.F 6.e-25F NO: +1.2 -1.20 1.2e+ 1E-.1 00 +0e0 535 e08 -6e6f 6e6+L 6F 6.e-2.5F The first part of the required state diagram is provided below and must be present in your finished diagram, with the ??? transitions at the bottom connected to what you add. A state machine is often implemented as a separate function and in this diagram the word ENTER represents the function's entry point. Transitions to the following four identifiers represent returns from the function and have the indicated meanings: FAIL - string did not represent a decimal floating literal. FLOAT - string represented a type float decimal floating literal. DOUBLE string represented a type double decimal floating literal. L_DOUBLE string represented a type long double decimal floating literal. Additional Requirements: 1. A correct diagram has exactly 9 states. Function entry points and returns do not count as states. 2. State names must meaningfully indicate the current status of the string porse and must be legal identifiers that you will use unaltered in your state machine code in the next exercise. 3. Use identifiers FAIL, FLOAT, DOUBLE, and LLDOUBLE as return indicators only - never as state names. 4. The string's next character is available upon entering each state and all transitions out of that state must be based solely upon that character. Looking back or looking ahead is prohibited. 5. More than one default transition out of any state makes no logical sense and is always wrong. 6. Because the state diagram is processing a string and not a file do not label anything as EOF. 7. Do not attempt to determine the numeric value of a floating literal. ENTER FAIL FAIL START point NO WHOLE digit FAIL digiti FAIL DOUBLE end point WHOLE FRACT digit Ele digit Ele F/f LA ??? ??? 709 792 ENTER lo FAIL START FAIL DIGIT POINT FAIL DIGIT WHOLE NO WHOLE POINT DIGIT Ele DOUBLE EXPONENT FRACT Ele DIGIT FAIL +- FAIL SIGN DIGIT F/ 41 NEXT WHOLE F/f WHOLE FLOAT DIGIT L_DOUBLE FAIL FLOAT FAIL FAIL WHOLE_ LONG LI DOUBLE

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!