What does a double colon followed by an equals sign (::=) mean in programming documentation?

前端 未结 4 733
时光取名叫无心
时光取名叫无心 2020-12-22 23:44

What does ::= mean in programming documentation?
For example in the Lua documentation: or in Python documentation.

4条回答
  •  南方客
    南方客 (楼主)
    2020-12-23 00:20

    This is Backus-Naur Form (BNF) notation describing the language. ::= in this context means is defined as.

    For example, in the Python language documentation you refer to, an identifier is defined as a letter or an underscore, followed by a letter, a digit or an underscore. The notation then goes on to describe what a letter and a digit is defined as, and so on.

提交回复
热议问题