|
-
March 2nd, 2008, 10:03 PM
#1
floating constant
hey everyone .. i am trying to write a regular expression for the floating constant...here's the definition of floating constant:
A floating constant consists of an integer part, a decimal point, a fraction part, an e or E, an optionally signed integer exponent and an optional type suffix, one of f, F, l or L. The integer and fraction parts both consist of a sequence of digits. Either the integer part or the fraction part (not both) may be missing; either the decimal point or the e and the exponent (not both) may be missing.
what i am trying to do is write an expresstion for it similar to this one which was done for natural numbers:
Natural numbers (integers > 0) can be represented
using:
non zero digit ! 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
digit ! 0 | non zero digit
natural number ! non zero digit digit *
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|