# compiling-system-lab2 **Repository Path**: LouisJiangjing/compiling-system-lab2 ## Basic Information - **Project Name**: compiling-system-lab2 - **Description**: 哈工大2022春编译系统实验一 - **Primary Language**: C - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-03-26 - **Last Updated**: 2022-06-13 ## Categories & Tags **Categories**: Uncategorized **Tags**: 课程实验 ## README # compiling-system-lab2 ## 介绍 哈工大2022春编译系统实验二 ## 目录说明 compiling-system-lab2 doc 实验报告等文档 src enum.h 枚举类型定义头文件 lexical.l 词法分析 main.c 主函数入口 Makefile Makefile文件,用于自动编译和运行 node.h 树节点头文件 parser 生成的语义分析器 senmantic_analysis.c 语义分析的主要文件 senmantic_analysis.h 语义分析的头文件 synatx.y .y文件 test1.c-test23.c 教材测试文件 test.c 自己的测试文件 ## 使用说明 1. 进入src文件夹 2. make #编译源程序 3. make clean #清除不需要的中间文件 4. make test #一次性测试所有测试用例,由于实验2我实现了要求2.2,因此测试了test20.c与test21.c 注: 1. 在步骤4时,或者不使用make test 而是使用 ./parser test.c 一个一个文件地测试 2. 在步骤2时,或者使用make once 进行一键编译+测试