Thank you Jan Marcel, now I understand this part of Spec. I now will go back to read rest of it.
Best Kamil piątek, 29 października 2021 o 13:29:16 UTC+2 Jan Mercl napisał(a): > On Fri, Oct 29, 2021 at 12:53 PM Kamil Ziemian <kziem...@gmail.com> wrote: > > > > From what I understand about EBNF production_name should be defined > using EBNF notation in manner like below. > > > > production_name = something1 | something2 > > > > But I don't see such definition in Spec. > > Because production_name is a terminal symbol of the EBNF grammar per se. > > """" > Lower-case production names are used to identify lexical tokens. > Non-terminals are in CamelCase. > """" > > src: https://golang.org/ref/spec#Notation > > The above link defines a meta-grammar, ie. a grammar of the EBNF > grammar in which the actual Go EBNF grammar is later on defined. In > the Go case the terminals are really defined, like here > https://golang.org/ref/spec#Letters_and_digits. > > The EBNF grammar per se is outlined only loosely and is strictly not > complete in this case, so you're right. The reader is expected to > assume "usual" grammar of an identifier, like "a letter followed by 1 > or more letters or digits", for example. The "real" definition of EBNF > can be found for example here: > https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form. It > seems too long to include in the Go specs, moreover I think it even > differs in some details. > > -j > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/413421f3-914c-4a71-8cd5-4464b8262802n%40googlegroups.com.