随笔分类 -  编译原理

摘要:There are three general types of parsers for grammars | universal | top-down | bottom-up | | : | : | : | |Cocke-Younger-Kasami algorithm, Earley's alg 阅读全文
posted @ 2020-03-19 08:39 tong96 阅读(1154) 评论(0) 推荐(0)
摘要:一、词法分析器的作用 1.识别源文件中的 space 和注释并删除; 2.识别源文件中的 lexeme; 3.用 token 来代替源文件中的 lexeme,token 的形式为 <token-name, attribute-value>; 其中 attribute-value为可选项,例如对于常量 阅读全文
posted @ 2020-03-06 15:12 tong96 阅读(1455) 评论(0) 推荐(0)
摘要:一、语言处理器 语言处理器有编译器(compiler)、解释器(interpreter) 编译器先把源程序翻译成目标程序,目标程序处理输入产生输出。 解释器自身直接(根据源程序提示)处理输入产生输出。 编译器的处理速度较快,但排错功能不如解释器。 编译器: 解释器: 将源程序翻译成目标程序的过程: 阅读全文
posted @ 2020-02-17 22:57 tong96 阅读(278) 评论(0) 推荐(0)