Lfc is yet another functional programming language which has many characteristics , such as good mathematics basis , reference transparency , no side effect , pattern matching , etc . in theory , an algorithm of enumerating sentences of cfg is presented 本文工作主要是研究形式规约语言lfc的实现和应用,另外还包括一个上下文无关语言句子枚举算法。在理论方面,提出了一个上下文无关语言句子枚举算法。
First , the minimal and maximal sentences of cfg are calculated . then the character strings are scanned one by one from the minimal sentence in certain order till the maximal sentence . the scanned character strings are printed or skipped according to a rule 该枚举算法首先计算上下文无关语言的最小序句子和最大序句子,然后从最小序句子开始按照一定的顺序扫描字符串,直至扫描到最大序句子为止,对被扫描的字符串进行判断取舍。
First , the paper researches the format and semantic features of iso apt in detail , next , applies regular expression to describe the definition of apt ’ s tokens and uses context - free grammar to describe apt ’ s syntax rules , last , designs the intermediate code format which keeps on the source code semantic and designs a complete module to check lexical and syntax errors of nc code by using modern compiling techniques 在代码预处理技术方面,详细研究了标准数控代码语言的格式和语义并采用现代编译技术中的正则表达式和上下文无关文法分别描述了标准数控代码语言的记号定义和语法结构定义;设计了保持源代码语义的中间标准数控代码格式,在此基础上,设计并构建了数控代码的词法和语法检查模块。