Giter Club home page Giter Club logo

cslox's Introduction

cslox: C# implementation of Lox

Lox is the programming language from "Crafting Interpreters"; see http://craftinginterpreters.com/

I'm going to write it in C# because I don't know any Java.

Compiling it

dotnet build

Running it

dotnet run
dotnet run input.lox

C# on .NET Core on Linux with VS Code

Follow up

There are a few well-established styles of IRs out there. Hit your search engine of choice and look for “control flow graph”, “static single-assignment”, “continuation-passing style”, and “three-address code”.

Erlang, since 22(?) uses SSA. What did it do before that? What are some other examples?


If you’ve ever wondered how GCC supports so many crazy languages and architectures, like Modula-3 on Motorola 68k, now you know. Language front ends target one of a handful of IRs, mainly GIMPLE and RTL. Target backends like the one for 68k then take those IRs and produce native code.

What languages can be converted to GIMPLE or RTL? What backends to GIMPLE and RTL are there? Are there interpreters for same?


Smalltalk has no built-in branching constructs, and relies on dynamic dispatch for selectively executing code.

Given lunchtime's conversation with Charlie about the fact that if is a statement (or an expression, in Rust), not a keyword, this note about Smalltalk intrigues me.

Further Reading

...being things that were referenced in the "Crafting Interpreters" book (and some that weren't) that I should take the time to read later:

cslox's People

Contributors

rlipscombe avatar

Stargazers

 avatar

Watchers

 avatar  avatar  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.