I\'m trying to prove that a simple function call such as
window.alert();
is valid EcmaScript 2016 (7th Edition) grammar. Working backward, with
An AssignmentExpression does not necessarily need to be an assignment, it only means "an assignment could stand here". It can also consist of solely a ConditionalExpression. And now we need to go down the whole chain of associativity rules:
A ConditionalExpression can contain a ternary operator or consist solely of a LogicalORExpression. A LogicalORExpression can contain an ||
operator or consist solely of a LogicalANDExpression. And so on: A LogicalANDExpression can consist solely of a BitwiseORExpression which can consist of solely a BitwiseXORExpression which can consist of solely a BitwiseANDExpression which can consist of solely an EqualityExpression which can consist of solely a RelationalExpression which can consist of solely a ShiftExpression which can consist of solely an AdditiveExpression which can consist of solely a MultiplicativeExpression which can consist of solely an ExponentiationExpression which can consist of solely a UnaryExpression which can consist of solely an UpdateExpression.
Which finally can consist of the LeftHandSideExpression that we were looking after.