Question: 2. Make a context independent grammar (C.I.G.), which generates the conditional if statement with the following restrictions: - You are always going to compare a

2. Make a context independent grammar (C.I.G.), which generates the conditional if statement with the following restrictions: - You are always going to compare a variable with an integer or a variable with another variable. - The relational operators are: <>==!=. - Variables must start at a letter and after that letter there can be any number of numbers or letters. A a a1 a01 restrictions 0a 0 - Numbers are only to be integers of any number of digits. - A number must not start at zero, but may be zero. Restriction 02 2 0 2000 1727 - The logical operators && (and) and II (or) can be used. - Only the parentheses after the if and at the end of the if are to be used. - The body of the if must be indicated by braces - Only assignment expressions are considered in the body of the if, each of them ending with a semicolon (;).

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!