unity0703

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

  •  
  •   unity0703 · Mar 31, 2016 · 2925 views
    This topic created in 3727 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   ·   5904 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 06:15 · PVG 14:15 · LAX 23:15 · JFK 02:15
    ♥ Do have faith in what you're doing.