Question: An integer constant is a decimal (base 10), octal (base 8), or hexadecimal (base 16) number that represents an integral value. Use integer constants to
An integer constant is a decimal (base 10), octal (base 8), or hexadecimal (base 16) number that represents an integral value. Use integer constants to represent integer values that can't be changed. If an integer constant begins with 0x or 0X, it's hexadecimal. If it begins with the digit 0, it's octal. Otherwise, it's assumed to be decimal. No white-space characters can separate the digits of an integer constant. These examples show some valid decimal, octal, and hexadecimal constants. /* Decimal Constants */ int dec_int = 28; unsigned dec_uint = 4000000024u; long dec_long = 2000000022l; /* Octal Constants */ int oct_int = 024; unsigned oct_uint = 04000000024u; long oct_long = 02000000022l; /* Hexadecimal Constants */ int hex_int = 0x2a; __int64 hex_i64 = 0x4a44000000000020I64; unsigned __int64 hex_ui64 = 0x8a44000000000040Ui64;

6. (15 points) Create a regular expression, DFA, and Regular Grammar for the integer constant.
7. (5 points) Analyze the above problem for the 4 language criteria.
8. (10 points) Write code that that lets you know if a string is an email address or not. Based on the definition from problem 1.
9. (15 points) Write code that that lets you know if a string is an floating point literal or not. Based on the definition from problem 4.
10. (15 points) Write code that that lets you know if a string is an integer literal or not. Based on the definition from problem 6.
An integer constant is a decimal (base 10), octal (base 8), or hexadecimal (base 16) number that represents an integral value. Use integer constants to represent integer values that can't be changed. If an integer constant begins with 0x or OX, it's hexadecimal. If it begins with the digit 0 , it's octal. Otherwise, it's assumed to be decimal. No white-space characters can separate the digits of an integer constant. These examples show some valid decimal, octal, and hexadecimal constants. 6. (15 points) Create a regular expression, DFA, and Regular Grammar for the integer constant. 7. (5 points) Analyze the above problem for the 4 language criteria. 8. (10 points) Write code that that lets you know if a string is an email address or not. Based on the definition from problem 1. 9. (15 points) Write code that that lets you know if a string is an floating point literal or not. Based on the definition from problem 4. 10. (15 points) Write code that that lets you know if a string is an integer literal or not. Based on the definition from problem 6
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
