context-free环境无关语法

In computer science, the most common type of grammar is context-free grammar . 

The meaning of the term "context-free" is that context-free languages ​​do not allow the expression of context dependence. 

For example, in the C language, an expression a * b, depending on the values a and b can mean a pointer declaration, or a multiplicative expression. Context-free grammars are drop-down, that is, some objects denoting an entity of the language are expressed in terms of other objects, which in turn can be expressed in terms of third objects, and so on.

 

在c语言中表达式 “a * b” 既可以表示 定义一个指向a类型的指针变量b,又可以表示a与b的乘积,所以这是环境无关的,与环境不依赖的。

posted @ 2021-10-08 10:25  zjsxwc  阅读(94)  评论(0编辑  收藏  举报