GetPoplog / Grammar

Managing the Pop-11 Grammar
Creative Commons Zero v1.0 Universal
2 stars 1 forks source link

Empty Expressions #7

Closed sfkleach closed 3 years ago

sfkleach commented 3 years ago

Allow expressions to be empty, as per line 189 of POPSYNTAX and introduce the non-terminal NonEmptyExpression. Use NonEmptyExpression to ensure the left-hand side of a FunctionApplication is non-empty. Simplify where appropriate.

Acceptance Criteria

EBNF:

Identical criteria for Tabatkins grammar:

edgardozoppi commented 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?