Skip to content
This repository has been archived by the owner on Sep 27, 2019. It is now read-only.

expression derivation problems in grammar #89

Open
ericlippert opened this issue Jan 6, 2017 · 0 comments
Open

expression derivation problems in grammar #89

ericlippert opened this issue Jan 6, 2017 · 0 comments

Comments

@ericlippert
Copy link
Contributor

In reading through ch 22 we can see that there is no way to get from "expression" to many of the kinds of expressions. A few oddities:

"conditional-expression" is defined as

conditional-expression:
logical-inc-OR-expression
logical-inc-OR-expression ? expressionopt : conditional-expression

But this is the only place that "conditional-expression" appears in ch 22, so there is no path from "expression" to "conditional-expression".

In fact there is no path from "expression" to "primary-expression". We have

expression:
assignment-expression

assignment-expression:
lambda-expression
simple-assignment-expression  -- this is what it says on the tin
compound-assignment-expression -- as is this

lambda-expression:
piped-expression
asyncopt lambda-function-signature ==> lambda-body

piped-expression:
coalesce-expression
piped-expression |> coalesce-expression

But coalesce-expression is not defined in ch 22. It is defined in ch 10 as

coalesce-expression:
logical-inc-OR-expression ?? expression

So (1) coalesce-expression definitely needs to be defined in ch 22, and (2) it probably needs to make progress towards primary-expression.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant