GithubHelp home page GithubHelp logo

dqinyuan / playwithcompiler Goto Github PK

View Code? Open in Web Editor NEW

This project forked from richardgong/playwithcompiler

1.0 1.0 0.0 16.71 MB

A GeekTime course about constructing a compiler.

Java 45.18% JavaScript 0.10% C++ 37.74% CMake 0.80% Makefile 1.06% ANTLR 14.48% Assembly 0.50% C 0.09% HTML 0.05%

playwithcompiler's Introduction

Play With Complier

本项目是极客时间的《编译原理之美》课程的示例代码。

课程Web网址:https://time.geekbang.org/column/intro/219

或者下载“极客时间”APP,查找《编译原理之美》课程。

目录内容

lab

课程实验和资料。

  • lab/01 :第1讲的资料,包含一个pdf文档,是第一课中提到的自动生成parser的工具。
  • lab/craft : 第2-5讲的资料。手工实现的简单的词法分析器、语法分析器、计算器、脚本解释器。
    • SimpleLexer.java:一个简单的词法分析器。
    • SimpleCalculator.java:一个简单的计算器,提供了基础的语法分析功能。对表达式的解析会有结合性问题。
    • SimpleParser.java: 一个更好的语法解析器。在左递归、优先级和结合性方面都没有问题。
    • SimpleScript.java:一个简单的脚本解释器。它提供了一个REPL界面,输入命令并执行。
      比如,输入: java SimpleScript
      或:java SimpleScript -v
      -v 参数会让解释器打印AST和求值过程。

注意

随着课程进度,会不断更新资料内容和本文档的内容。
本项目的代码也会处在不断的变化中。

playwithcompiler's People

Contributors

richardgong avatar

Stargazers

 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.