Description: PL/0语言是Pascal语言的一个子集,我们这里分析的PL/0的编译程序包括了对PL/0语言源程序进行分析处理、编译生成类PCODE代码,并在虚拟机上解释运行生成的类PCODE代码的功能。
PL/0语言编译程序采用以语法分析为核心、一遍扫描的编译方法。词法分析和代码生成作为独立的子程序供语法分析程序调用。语法分析的同时,提供了出错报告和出错恢复的功能。在源程序没有错误编译通过的情况下,调用类PCODE解释程序解释执行生成的类PCODE代码。以下源程序是以清华大学出版社《编译原理》中的源代码为基础作了少量改动而成。
程序在Turbo Pascal 7.0上编译运行通过。
-PL / 0 language Pascal language is a subset of, we have here the analysis of PL / 0 compilers including the right PL / 0 language source analysis, category PCODE compiler code generation and the virtual machine running on to explain the formation PCODE category code functions. PL / 0 language compiler to use syntax analysis of the core, the compiler again scanning methods. Lexical analysis, and code generation as an independent for the subroutine call syntax analysis procedures. Grammatical analysis at the same time, provided a report errors and error recovery functions. The source did not compile the wrong circumstances, PCODE category called to explain the interpretation and implementation of procedures generated PCODE category code. Following is the source Qinghua University Press, &quo Platform: |
Size: 19052 |
Author:姚紫欣 |
Hits:
Description: 语法分析器构造
借助于词法分析程序提供的分析结果,编写一个算符优先语法分析程序,程序能进行语法结构分析和错误检查并产生相应的归约信息。同时给出出错信息和错误类型,从而加深对语法分析的理解。
-parser using lexical analysis procedure for the analysis of results prepare a priority operator syntax analysis procedures, procedures for structural analysis and syntax error checking and produce corresponding reduction information. Also given wrong information and the wrong types, so as to enhance the understanding of syntax analysis. Platform: |
Size: 11939 |
Author:duoduo |
Hits:
Description: 在本编译程序中,源语言为PL/0语言,目标语言为假想栈式计算机的汇编语言.PL/0语言是Pascal语言的一个子集,PL/0的编译程序包括了对PL/0语言源程序进行分析处理、编译生成类PCODE代码,并在虚拟机上解释运行生成的类PCODE代码的功能。
PL/0语言编译程序采用以语法分析为核心、一遍扫描的编译方法。词法分析和代码生成作为独立的子程序供语法分析程序调用。语法分析的同时,提供了出错报告功能。在源程序没有错误编译通过的情况下,调用类PCODE解释程序解释执行生成的类PCODE代码。
该软件为PL/0语言编译程序,所实现的扩充功能如下:
1.增加单词:保留字 ELSE,FOR,TO, DOWNTO
2.增加运算 +=,-=,++,--
3.不等号# 改为 <>
4.增加条件语句的ELSE子句
5.扩充语句:
①FOR <变量>:=<表达式> TO <表达式> DO <语句>
②FOR <变量>:=<表达式> DOWNTO<表达式> DO <语句>
其中,语句①的循环变量的步长为1,
语句②的循环变量的步长为-1。
概述
源文件: *.plo
目标文件: *.COD
实现平台:C++ Builder6.0
-the compiler, the source language of PL / 0 language, target language of the imaginary stack of computer assembly language. PL / 0 language Pascal language is a subset of, PL / 0 compilers including the right PL / 0 language source analysis, category PCODE compiler code generation and the virtual machine running on to explain the formation PCODE category code functions. PL / 0 language compiler to use syntax analysis of the core, the compiler again scanning methods. Lexical analysis, and code generation as an independent for the subroutine call syntax analysis procedures. Grammatical analysis at the same time, provided the error reporting function. The source did not compile the wrong circumstances, Call category PCODE explain the interpretation and implementation of procedures generated P Platform: |
Size: 383061 |
Author:mayfar |
Hits:
Description: 进行语法的分析,与词法分析器共同构成一个程序的分析器,检查程序错误等-syntax analysis, and the lexical analyzer together constitute a process analyzers, error checking procedures Platform: |
Size: 15509 |
Author:daniao |
Hits:
Description: 《PL/0的编译器》:PL/0语言是Pascal语言的一个子集,《PL/0的编译器》实现了把客户用PL/0语言编写的程序编译成类PCODE代码,并能虚拟机上解释运行生成的类PCODE代码的功能。《PL/0的编译器》采用以语法分析为核心、一遍扫描的编译方法。词法分析和代码生成作为独立的子程序供语法分析程序调用。语法分析的同时,提供了出错报告和出错恢复的功能。-"PL / 0 compiler" : PL / 0 Pascal language is a language subset, "PL / 0 compiler" achieved the customers using PL / 0 language procedures compiled PCODE category code and the virtual machine can explain the operation generated PCODE category code functions. "PL / 0 compiler" to use syntax analysis of the core, the compiler again scanning methods. Lexical analysis and code generation as an independent for the subroutine call syntax analysis program. Grammatical analysis at the same time, provided a report errors and error recovery functions. Platform: |
Size: 383937 |
Author:李建龙 |
Hits:
Description: 名称:C语言词法分析器 功能:1)从C语言源代码文件中提取所有词素 2)检测程序的词法错误,给出错误行号及提示 3)语法分析器的预备程序 文件:分析器代码(Lex.c)、测试文件(test.c)、状态转换图、可执行程序 输出:错误记录文件、符号表文件、标识符文件-Name lexical analyzer for C language
function:
1)Extract all lexems from C Language source code
2)Examine the syntax errors of the program and provide the line number of error line and note
3)preprocessed program file of the lexical analyzer source code of the analyzer(Lex.c), test file(test.c),status transformation chart,excutable program. Output: Error-recording file, symbol table file and identifier file. Platform: |
Size: 192513 |
Author:张永胜 |
Hits:
Description: 名称:C语言词法分析器 功能:1)从C语言源代码文件中提取所有词素 2)检测程序的词法错误,给出错误行号及提示 3)语法分析器的预备程序 文件:分析器代码(Lex.c)、测试文件(test.c)、状态转换图、可执行程序 输出:错误记录文件、符号表文件、标识符文件-Name lexical analyzer for C language
function:
1)Extract all lexems from C Language source code
2)Examine the syntax errors of the program and provide the line number of error line and note
3)preprocessed program file of the lexical analyzer source code of the analyzer(Lex.c), test file(test.c),status transformation chart,excutable program. Output: Error-recording file, symbol table file and identifier file. Platform: |
Size: 192512 |
Author:张永胜 |
Hits:
Description: PL/0语言是Pascal语言的一个子集,我们这里分析的PL/0的编译程序包括了对PL/0语言源程序进行分析处理、编译生成类PCODE代码,并在虚拟机上解释运行生成的类PCODE代码的功能。
PL/0语言编译程序采用以语法分析为核心、一遍扫描的编译方法。词法分析和代码生成作为独立的子程序供语法分析程序调用。语法分析的同时,提供了出错报告和出错恢复的功能。在源程序没有错误编译通过的情况下,调用类PCODE解释程序解释执行生成的类PCODE代码。以下源程序是以清华大学出版社《编译原理》中的源代码为基础作了少量改动而成。
程序在Turbo Pascal 7.0上编译运行通过。
-PL/0 language Pascal language is a subset of, we have here the analysis of PL/0 compilers including the right PL/0 language source analysis, category PCODE compiler code generation and the virtual machine running on to explain the formation PCODE category code functions. PL/0 language compiler to use syntax analysis of the core, the compiler again scanning methods. Lexical analysis, and code generation as an independent for the subroutine call syntax analysis procedures. Grammatical analysis at the same time, provided a report errors and error recovery functions. The source did not compile the wrong circumstances, PCODE category called to explain the interpretation and implementation of procedures generated PCODE category code. Following is the source Qinghua University Press, &quo Platform: |
Size: 18432 |
Author:姚紫欣 |
Hits:
Description: 语法分析器构造
借助于词法分析程序提供的分析结果,编写一个算符优先语法分析程序,程序能进行语法结构分析和错误检查并产生相应的归约信息。同时给出出错信息和错误类型,从而加深对语法分析的理解。
-parser using lexical analysis procedure for the analysis of results prepare a priority operator syntax analysis procedures, procedures for structural analysis and syntax error checking and produce corresponding reduction information. Also given wrong information and the wrong types, so as to enhance the understanding of syntax analysis. Platform: |
Size: 382976 |
Author:duoduo |
Hits:
Description: 在本编译程序中,源语言为PL/0语言,目标语言为假想栈式计算机的汇编语言.PL/0语言是Pascal语言的一个子集,PL/0的编译程序包括了对PL/0语言源程序进行分析处理、编译生成类PCODE代码,并在虚拟机上解释运行生成的类PCODE代码的功能。
PL/0语言编译程序采用以语法分析为核心、一遍扫描的编译方法。词法分析和代码生成作为独立的子程序供语法分析程序调用。语法分析的同时,提供了出错报告功能。在源程序没有错误编译通过的情况下,调用类PCODE解释程序解释执行生成的类PCODE代码。
该软件为PL/0语言编译程序,所实现的扩充功能如下:
1.增加单词:保留字 ELSE,FOR,TO, DOWNTO
2.增加运算 +=,-=,++,--
3.不等号# 改为 <>
4.增加条件语句的ELSE子句
5.扩充语句:
①FOR <变量>:=<表达式> TO <表达式> DO <语句>
②FOR <变量>:=<表达式> DOWNTO<表达式> DO <语句>
其中,语句①的循环变量的步长为1,
语句②的循环变量的步长为-1。
概述
源文件: *.plo
目标文件: *.COD
实现平台:C++ Builder6.0
-the compiler, the source language of PL/0 language, target language of the imaginary stack of computer assembly language. PL/0 language Pascal language is a subset of, PL/0 compilers including the right PL/0 language source analysis, category PCODE compiler code generation and the virtual machine running on to explain the formation PCODE category code functions. PL/0 language compiler to use syntax analysis of the core, the compiler again scanning methods. Lexical analysis, and code generation as an independent for the subroutine call syntax analysis procedures. Grammatical analysis at the same time, provided the error reporting function. The source did not compile the wrong circumstances, Call category PCODE explain the interpretation and implementation of procedures generated P Platform: |
Size: 384000 |
Author:mayfar |
Hits:
Description: 进行语法的分析,与词法分析器共同构成一个程序的分析器,检查程序错误等-syntax analysis, and the lexical analyzer together constitute a process analyzers, error checking procedures Platform: |
Size: 156672 |
Author:daniao |
Hits:
Description: 编译原理课程设计:建立文法及其LL(1)分析表表示的数据结构,设计并实现相应的预测分析器,对源程序经词法分析后生成的二元式代码流进行预测分析,如果输入串是文法定义的句子则输出“输入串分析成功”,否则输出“输入串语法错误”。-Principles of Course Design Compiler: A Grammar and LL (1) of the table that the data structure, design and implement the corresponding prediction analyzer, on the source code generated by the lexical analysis to predict the binary type code flow analysis, if the input string is the definition of sentence grammar, the output " input string of success" , or output " input string syntax error." Platform: |
Size: 101376 |
Author: |
Hits:
Description: c++编写的词法分析器,能够对简单的语法错误进行检测和报错!-written in c++ lexical analyzer can be a simple syntax error detection and error! Platform: |
Size: 915456 |
Author:zhong |
Hits:
Description: 基于对类Pascal语言的词法分析的基础上,用C实现的对词法分析程序所提供的单词序列进行语法分析和检查,对不符合语法规则的进行报错。-Class Pascal language lexical analysis based on word sequence of lexical analysis procedures implemented in C syntax analysis and inspection, do not conform to the rules of grammar error. Platform: |
Size: 476160 |
Author:马倩 |
Hits:
Description: 词法分析器,接收源程序,得到该程序的token串-Simple design of a simple language compiler, we realize that the symbol table design, the design of lexical analysis, syntax analysis and semantic analysis of the design, and ultimately produce quaternion type. Lexical analysis is complete token strings, check fill in the symbol table, check the lexical errors, and determine the scope of Ascii code symbols, such as: Comment not closed, illegal characters (if the Chinese way of parenthesis ()) and more than Ascii code range of characters (if NULL) and the like and to handle errors and the error location and the symbol set. Syntax analysis is done to check syntax error: checking a program statement, assignment (: =), begin statement, for statement, while statement, if statements, call statements, and integer program body, real program body, procedure program body, etc., There is a lack of symbols: With the left parenthesis and no closing parenthesis and so on. And to determine the location of a syntax error. Semantic analysis can genera Platform: |
Size: 528384 |
Author:mutian |
Hits:
Description: 将实验一“词法分析器”与实验二“语法分析器”之间的衔接方式由独立一遍改为独立子程序。
于语法正确的表达式,报告“语法正确”;
对于语法错误的表达式,报告“语法错误”, 指出错误原因。
-The Cohesion experiment " lexical analyzer" and Experiment II " parser" between independent again to separate subroutine. Grammatically correct expressions in the report " grammatically correct" expression for syntax errors, the report " Syntax Error" , pointed out the wrong reasons. Platform: |
Size: 5414912 |
Author:盛俊 |
Hits:
Description: 上海大学编译原理实验二
词法分析
pl/0将实验一“词法分析”的输出结果,作为表达式语法分析器的输入,进行语法解析,对于语法正确的表达式,报告“语法正确”; 对于语法错误的表达式,报告“语法错误”, 指出错误原因。-Compiler theory Shanghai University Experiment II
Lexical analysis
pl/0 to experiment a "lexical analysis" of the output, as the expression parser s input, parsing, for the grammatically correct expression, the report "grammatically correct" expression for syntax errors, the report "Syntax error ", pointed out the wrong reasons. Platform: |
Size: 2489344 |
Author:盛俊 |
Hits:
Description: 实现词法分析生成二元式,并通过语法分析生成变量名表,报告错误类型与位置-Realize of lexical analysis generated binary type, and through the syntax analysis to generate variable watches, report an error type and location Platform: |
Size: 2347008 |
Author:陈桥 |
Hits: