move direction number (e.g., move left 10, move up 20) rotate number angle-type (e.g., rotate 10 degrees, rotate .25 radians) zoom number (e.g., zoom 2, zoom 0.5) scale number number number (scale 2 3 5)Here are additional specifications:
a < 10
b > 50
c == d
Use something like relExp as your start non-terminal because
you will need to use exp later in this assignment.
a and not (b or (c and not d))Use something like boolExp as your start non-terminal because you will need to use exp later in this assignment.
while (boolean expression) do
assignment statements and/or nested while loops
end
For example:
while (a < 10 or b > 20) do
a = b;
b = c * 20;
i = 0;
while (i < 10) do
i = i + 1;
end
end
Your grammar should meet the following specifications:
id = exp;where exp is the non-terminal for the arithmetic expression grammar I used in class. Please do not copy the expression grammar I used in class, just use the exp non-terminal.
letter (letter | digit)*