unity0703

一个非常小的编译器学习例子

  •  
  •   unity0703 · Mar 31, 2016 · 2915 views
    This topic created in 3721 days ago, the information mentioned may be changed or developed.

    https://github.com/thejameskyle/the-super-tiny-compiler/blob/master/super-tiny-compiler.js

    200 多行代码+ 500 多行注释,从 TOKENIZER 到 PARSER 之类的基本概念都覆盖到了,这个例子非常适合编译器入门学习

    当然功能也很简单,就是把(add 2 (subtract 4 2))之类的 lisp 风格代码编译成对应的 C 语言代码: add(2, subtract(4, 2))

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1075 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 22:43 · PVG 06:43 · LAX 15:43 · JFK 18:43
    ♥ Do have faith in what you're doing.