其他分享
首页 > 其他分享> > context-free环境无关语法

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.

 

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

标签:terms,free,语法,objects,expressed,context,expression
来源: https://www.cnblogs.com/zjsxwc/p/15378552.html