# Pascal-Compiler-4 **Repository Path**: ten_addtiply/pascal-compiler-4 ## Basic Information - **Project Name**: Pascal-Compiler-4 - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-07-10 - **Last Updated**: 2021-07-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # pascal-compiler **2021 《spring semester Course designation》in major 'Data Science and Big data technology'** - group 4. # Compile and Usage **Required**: - 系统版本:Ubuntu 18.04 LTS (4.15.0-136-generic) - Flex 版本:flex 2.6.4 - Yacc 版本:bison (GNU Bison) 3.0.4 - GCC 版本:gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04) - Make版本:GNU Make 4.1 - 代码管理工具:Git - 代码托管平台:Gitee - 项目地址(开源):https://gitee.com/ten_addtiply/pascal-compiler-4 ``` sudo apt-get install flex sudo apt-get install bison sudo apt-get install gcc make clean make ``` # Usage ``` Usage: ./pascal2asm .pas [-h] [-o] [] [-v] -h Display help information. -o Place the output into . -v Display compiler version information. ``` # work finished 词法分析(√) 语法分析(√) 中间代码生成(AST的正确构建) (√) 语义错误检查 (√) - 符号定义检查 (√) - 操作数类型检查 (√) - 类型匹配检查 (√) - 数组索引下标检查 (√) - 函数和过程重复定义检查 (√) 目标代码生成(汇编) (√) 汇编代码正常运行 (X) 编译器使用说明(内嵌与可执行程序中,可通过命令行查看)(√) # support 类型------------- - Integer - Real - Char - Bool(True、False) - Record - Array 运算-------------- - ASSIGN - MINUS - PLUS - DIV - OR - AND - NOT - MOD 声明-------------- - variable - type - function - procedure 语句-------------- - if - for - repeat - while - case - goto 输入输出-------------- - write - writeln - read