An array-spec like `(:,:)` (with one or more colons) is either a
deferred-shape-spec-list or an assumed-shape-spec-list and they
can only be distinguished by context that the parser doesn't have.
We were parsing these as assumed-shape-spec-list but they are easier
to deal with if we parse them as deferred-shape-spec-list because
anything that is the latter is also one of the former.
Original-commit: flang-compiler/f18@
78c3f3b96f78e45b1b9966b331d8cda691fa39bd
Reviewed-on: https://github.com/flang-compiler/f18/pull/630
Tree-same-pre-rewrite: false
// a need for forced look-ahead.
TYPE_PARSER(
construct<ArraySpec>(parenthesized(nonemptyList(explicitShapeSpec))) ||
+ construct<ArraySpec>(parenthesized(deferredShapeSpecList)) ||
construct<ArraySpec>(
parenthesized(nonemptyList(Parser<AssumedShapeSpec>{}))) ||
- construct<ArraySpec>(parenthesized(deferredShapeSpecList)) ||
construct<ArraySpec>(parenthesized(Parser<AssumedSizeSpec>{})) ||
construct<ArraySpec>(parenthesized(Parser<ImpliedShapeSpec>{})) ||
construct<ArraySpec>(parenthesized(Parser<AssumedRankSpec>{})))