Skip to content

lingkerio/cp_courses

Repository files navigation

编译原理学习辅助程序

这是我在学习武汉大学编译原理课程期间,编写的几个玩具程序,旨在辅助我对编译原理相关概念的理解和实践。目前该项目包含以下几个模块:

模块介绍

1. Arithmetic 模块

这是一个简单的算术表达式处理器,用于解析和计算基础的四则运算表达式。

2. GrammarClassifier 模块

该模块用于分类乔姆斯基语法等级体系(Chomsky Hierarchy)的语言类型。

3. ParseTreeGenerator 模块

这是一个解析树生成器,专用于上下文无关语法(CFG)。

4. LL1Parser 模块

这是一个LL1 parser,包含递归下降与表驱动两种方法。

5. lexer 模块

这是一个为rust语言实现的手写lexer,并为parser提供了相应的接口。

项目背景

本项目是我在学习武汉大学的编译原理课程期间,基于课堂理论知识编写的实践性程序,旨在巩固我对编译器原理中各类核心概念的掌握。每个模块都独立运行,并且可用于分析不同的语法或表达式。


Compiler Principle Learning Support Programs

This repository contains several toy programs I developed during my study of the Compiler Principle course at Wuhan University. These programs serve as learning aids to help me better understand key concepts in compiler principle. The current project includes the following modules:

Module Overview

1. Arithmetic Module

This is a basic arithmetic expression processor designed to parse and evaluate simple arithmetic operations.

2. GrammarClassifier Module

This module is used to classify languages based on the Chomsky Hierarchy.

3. ParseTreeGenerator Module

This module generates parse trees for context-free grammars (CFG).

4. LL1Parser Module

This is an LL1 parser that includes both recursive descent and table-driven methods.

5. lexer Module

This is a hand-written lexer implemented for the Rust language, and it provides the corresponding interface for the parser.

Project Background

This project was developed during my study of the Compiler Principle course at Wuhan University. It is a set of practical programs built upon the theoretical knowledge acquired in class, aiming to strengthen my grasp of key concepts in compiler theory. Each module functions independently and can be used to analyze different grammars or expressions.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published