unity0703

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

  •  
  •   unity0703 · Mar 31, 2016 · 2924 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   ·   925 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 18:45 · PVG 02:45 · LAX 11:45 · JFK 14:45
    ♥ Do have faith in what you're doing.