In score = base + 6 * rate, what token kind does 6 have?
In this front end, what is the lexer's job?
Here * binds more tightly than +. The expression a + b * c groups as a + (b * c).
Circle one: True False
Use a binary-operator tree, where * binds more tightly than +. Which tree represents fee + hours * rate?
Ignore spaces and keep names whole. How does the lexer split score = base + 6 * rate?
Subtraction is left associative. How does unparenthesised a - b - c group?
Here term has no unparenthesised subtraction and | separates alternatives. Which rule makes subtraction left associative?
Subtraction is left associative. A parser groups 9 - 4 - 1 as 9 - (4 - 1), giving 6. Which diagnosis fits?