Fwd: Possible minor specification issues

132 views
Skip to first unread message

Jan Mercl

unread,
Jun 4, 2022, 1:41:50 PM6/4/22
to golang-dev, Robert Griesemer, Ian Lance Taylor
Gentle ping to golang-dev as suggested by others.

---------- Forwarded message ---------
From: Jan Mercl <0xj...@gmail.com>
Date: Mon, May 30, 2022 at 11:46 AM
Subject: Fwd: Possible minor specification issues
To: golang-nuts <golan...@googlegroups.com>, Ian Lance Taylor
<ia...@golang.org>, Robert Griesemer <g...@golang.org>


Gentle ping after no feedback.

FTR: The proposed change was tested by an ad-hoc PEG interpreter based
on the updated EBNF:
https://gitlab.com/cznic/gc/-/blob/6cc7f3006a019a52c49db3d13276c0a5c6d24a00/v2/internal/ebnf/all_test.go#L275.

---------- Forwarded message ---------
From: Jan Mercl <0xj...@gmail.com>
Date: Fri, May 20, 2022 at 9:42 PM
Subject: Possible minor specification issues
To: golang-nuts <golan...@googlegroups.com>
Cc: Robert Griesemer <g...@golang.org>


I think there might be two small omissions in the EBNF grammar for Go 1.18:

LiteralType = StructType | ArrayType | "[" "..." "]"
ElementType | SliceType | MapType | TypeName .
EmbeddedField = [ "*" ] TypeName .

It seems to me that in both productions s/TypeName/TypeName [ TypeArgs
]/ is correct. Other options are available, like changing the
definition of TypeName to include the optional TypeArgs part and
dropping the same from the Type production.

-j
Reply all
Reply to author
Forward
0 new messages