This is not a Python language, it is a language that describes languages. Used to describe Python's lexical and syntax. Not only Python, when you look at the specifications of various languages, there will be similar things.
This is grammar, mentioned in the principles of compilation It is similar to this sentence pattern in English: Sentence:= subject + predicate + object Subject:= noun Predicate:= verb Object:= noun
:= means definition. In this way, you can determine the components that a language sentence should have, For example,defmust be followed by an identifier. If not, it is not grammatical and will be judged as an error.
The student answered and forgot everything he learned. That’s probably it. Please give me a slap in the face.
https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form
This is not a Python language, it is a language that describes languages. Used to describe Python's lexical and syntax.
Not only Python, when you look at the specifications of various languages, there will be similar things.
This is grammar, mentioned in the principles of compilation
It is similar to this sentence pattern in English:
Sentence:= subject + predicate + object
Subject:= noun
Predicate:= verb
Object:= noun
:= means definition.
In this way, you can determine the components that a language sentence should have,
For example,
def
must be followed by an identifier.If not, it is not grammatical and will be judged as an error.
The student answered and forgot everything he learned.
That’s probably it. Please give me a slap in the face.