Closed sfkleach closed 3 years ago
Now almost all existing uses of Expression have became NonEmptyExpression, except the usage for function arguments. This makes me consider doing the opposite thing of creating a new non-terminal PossibleEmptyExpression that is only used for function arguments and leave as Expression all the other usages that require a non-empty expression. I believe it feels more natural. What do you think?
Allow expressions to be empty, as per line 189 of POPSYNTAX and introduce the non-terminal
NonEmptyExpression
. UseNonEmptyExpression
to ensure the left-hand side of a FunctionApplication is non-empty. Simplify where appropriate.Acceptance Criteria
EBNF:
Expression
may be emptyFunctionApplication
left hand side is a non-empty expressionExpression?
should be simplified asExpression
Identical criteria for Tabatkins grammar:
Expression
may be emptyFunctionApplication
left hand side is a non-empty expressionExpression?
should be simplified asExpression