Question: I need help with doing these regular expressions. for example: (aabb | ba)a , defines a regular language that accepts aabba or baa. 1. [10

 I need help with doing these regular expressions. for example: (aabb

I need help with doing these regular expressions.

for example: (aabb | ba)a , defines a regular language that accepts aabba or baa.

1. [10 points] Write a regular expression that defines an integer constant in C++. The whole numbers may optionally have a leading negative sign. If the number is in hexadecimal, it starts with 0X and can contain the digits 0 to 9 and the letters A to F. Octal constants start with zero and can only contain the digits 0 to 2. [10 points] Write a regular expression that defines a money value, such as $12,345.67 There are only two digits to the right of the decimal point and always at least one dollar digit. The commas are optional 3. [10 points] Write a regular expression that defines the components of a simple expression. The elements of an expression can be names (a series of letters and numbers starting with a letter), numbers (unsigned whole decimal numbers) and the symbols "and"". The line must end in a semicolon. There can be multiple spaces (or not) between all of the components. There cannot be spaces in the middle of a name or number. Note that the order of the components is not important, although the semicolon must be at the end. Sample strings in this language include dog-cat +5; and +dog cat 47

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!