All Projects → RichardGong → Playwithcompiler

RichardGong / Playwithcompiler

A GeekTime course about constructing a compiler.

Programming Languages

java
68154 projects - #9 most used programming language

Labels

Projects that are alternatives of or similar to Playwithcompiler

Shedskin
Shed Skin is a Python to C++ compiler. Read the introduction below to learn about the restrictions.
Stars: ✭ 458 (-15.65%)
Mutual labels:  compiler
Pikelet
A friendly little systems language with first-class types. Very WIP! 🚧 🚧 🚧
Stars: ✭ 485 (-10.68%)
Mutual labels:  compiler
Libfsm
DFA regular expression library & friends
Stars: ✭ 512 (-5.71%)
Mutual labels:  compiler
Dotty
The Scala 3 compiler, also known as Dotty.
Stars: ✭ 4,836 (+790.61%)
Mutual labels:  compiler
Walt
⚡ Walt is a JavaScript-like syntax for WebAssembly text format ⚡
Stars: ✭ 4,513 (+731.12%)
Mutual labels:  compiler
Awesome Tensor Compilers
A list of awesome compiler projects and papers for tensor computation and deep learning.
Stars: ✭ 490 (-9.76%)
Mutual labels:  compiler
Halide
a language for fast, portable data-parallel computation
Stars: ✭ 4,722 (+769.61%)
Mutual labels:  compiler
Jtransc
Bytecode to source converting Java & Kotlin code into JavaScript, C++, D, C#, PHP, AS3, Dart and Haxe and run it everywhere. Also use JVM code in your favourite language as a library.
Stars: ✭ 532 (-2.03%)
Mutual labels:  compiler
Opal
Ruby ♥︎ JavaScript
Stars: ✭ 4,552 (+738.31%)
Mutual labels:  compiler
Langcraft
Compiler from LLVM IR to Minecraft datapacks.
Stars: ✭ 495 (-8.84%)
Mutual labels:  compiler
Dynarmic
An ARM dynamic recompiler.
Stars: ✭ 475 (-12.52%)
Mutual labels:  compiler
Eslisp
un-opinionated S-expression syntax and macro system for JavaScript
Stars: ✭ 481 (-11.42%)
Mutual labels:  compiler
Red
Red is a next-generation programming language strongly inspired by Rebol, but with a broader field of usage thanks to its native-code compiler, from system programming to high-level scripting and cross-platform reactive GUI, while providing modern support for concurrency, all in a zero-install, zero-config, single 1MB file!
Stars: ✭ 4,725 (+770.17%)
Mutual labels:  compiler
Renjin
JVM-based interpreter for the R language for the statistical analysis.
Stars: ✭ 466 (-14.18%)
Mutual labels:  compiler
Luago Book
《自己动手实现Lua》随书源代码
Stars: ✭ 514 (-5.34%)
Mutual labels:  compiler
Compiler
The Hoa\Compiler library.
Stars: ✭ 458 (-15.65%)
Mutual labels:  compiler
Turboscript
Super charged typed JavaScript dialect for parallel programming which compiles to WebAssembly
Stars: ✭ 487 (-10.31%)
Mutual labels:  compiler
Acwj
A Compiler Writing Journey
Stars: ✭ 5,891 (+984.9%)
Mutual labels:  compiler
Flow9
Platform for safe, easy and productive programming of complex, multi-platform apps with a modern user interface
Stars: ✭ 520 (-4.24%)
Mutual labels:  compiler
Roslynclrheapallocationanalyzer
Roslyn based C# heap allocation diagnostic analyzer that can detect explicit and many implicit allocations like boxing, display classes a.k.a closures, implicit delegate creations, etc.
Stars: ✭ 492 (-9.39%)
Mutual labels:  compiler

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和求值过程。
  • lab/antlrtest : 第6讲的示例代码。
  • lab/16-18 : 第16-18讲,算法篇的示例代码
    • Regex.java : 正则表达式工具,包括从正则表达式生成NFA,从NFA生成DFA,以及基于NFA和DFA做字符串匹配。
    • Lexer.java : 基于正则表达式自动做词法分析。
    • GrammarNode.java : 文法。能像EBNF那样表示词法和语法。
    • State.java : 有限自动机节点。
    • DFAState.java : DFA的节点。

playscript-java

这是一个java版本的脚本语言的参考实现,课程第7讲之后的示例以该项目为核心。
详细介绍,参见playscript-java的说明

环境配置

注意

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].