Optional brackets around lambda expression: proposed syntax with full grammar

Steven Simpson ss at comp.lancs.ac.uk
Sat Jun 18 02:36:40 PDT 2011


On 18/06/11 10:22, Ali Ebrahimi wrote:
> This is full grammar of my proposed syntax:
>
> LambdaDeclaration =
>                     LambdaParameterList '->' LambdaBody
>
> LambdaParameterList =
> 	ZeroOrOneLenParameterList | GreaterThanOneLenParameterList
>
> ZeroOrOneLenParameterList =
> 	('(')? LambdaParameter? (')')?

Wouldn't that permit these too?:

  ( x -> x
  x ) -> x
  ( -> x
  ) -> x

Cheers,

Steven


More information about the lambda-dev mailing list