Examples Specifying Tokens Example 6 Float 05 314 6111 10e 3 1000 1053e 1 9123e3 Regular E Q37300312

Examples of specifying tokens Example 6. Float .0.5, 3.14, -6.111, 1.0E+3, 100.0, -10.53E-1,9.123E3 Regular expression:

Examples of specifying tokens Example 6. Float .0.5, 3.14, -6.111, 1.0E+3, 100.0, -10.53E-1,9.123E3 Regular expression: Show transcribed image text Examples of specifying tokens Example 6. Float .0.5, 3.14, -6.111, 1.0E+3, 100.0, -10.53E-1,9.123E3 Regular expression:


Answer


Float =

(- + epsilon)(0 + (1+2+…+9)(0+1+2+…+9)*).(0 +(1+2+…+9)(0+1+2+…+9)*)(epsilon + E(- +epsion)(1+2+…+9)(0+1+2+…+9)*)

Explanation

(- + epsilon) is for -ve sign or nothing
(0 + (1+2+…+9)(0+1+2+…+9)*) is to have a number
(epsilon + E(- + epsion)(1+2+…+9)(0+1+2+…+9)*) Either E ornothing

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.