The Lune Compiler

Related tags

Embedded lune
Overview

Lune

A small C like programming language with the goal of compiling to C.

Progress:

  • Lexing
  • Parsing
  • AST generation
  • Type checking
  • Codegen

Syntax

# A comment
proc say_hello() {
    print("hello world!")
}

# conditionals example
var age : int = 18
if age >= 18 {
    print("you can drive")
} else {
    print("you can't drive")
}

Running

% cargo run
You might also like...
Take your first step in writing a compiler. Implemented in Rust.

first-step-rust Take your first step in writing a compiler, using Rust. Building from Source Make sure the Rust toolchain is installed on your compute

A Python compiler targeting JS, implemented in Rust.

A Python compiler targeting JavaScript, implemented in Rust.

The official torq compiler
The official torq compiler

Torq What makes Torq the goto language for creating CLI's? Smaller Executables Inbuilt argument and flag parser Your code will work anywhere in any OS

The official zeta compiler
The official zeta compiler

Torq What makes Torq the goto language for creating CLI's? Smaller Executables Inbuilt argument and flag parser Your code will work anywhere in any OS

The official zeta compiler
The official zeta compiler

Zeta What makes Zeta the goto language for creating CLI's? Smaller Executables Inbuilt argument and flag parser Your path seperators are automatically

rust-analyzer is a modular compiler frontend for the Rust language
rust-analyzer is a modular compiler frontend for the Rust language

rust-analyzer is a modular compiler frontend for the Rust language. It is a part of a larger rls-2.0 effort to create excellent IDE support for Rust.

dm-jitaux is a Rust-based JIT compiler using modified auxtools, dmasm and Inkwell LLVM wrapper for boosting Byond DM performance without any hassle!

dm-jitaux is a Rust-based JIT compiler using modified auxtools, dmasm and Inkwell LLVM wrapper for boosting Byond DM performance without any hassle (such as rewriting/refactroing your DM code).

The nightly_crimes!{} macro commits horrible crimes to allow you to enable nightly features on the stable compiler.

The nightly_crimes!{} macro commits horrible crimes to allow you to enable nightly features on the stable compiler.

Lumen - A new compiler and runtime for BEAM languages

An alternative BEAM implementation, designed for WebAssembly

An example of Brainf*** JIT-compiler with only the standard library.

jit-compiler An example of Brainf*** JIT-compiler with only the standard library. Prerequisite Rust(1.56.0-nightly or later, but it must work kind of

A compiler for the esoteric language ℂ.

The ℂ Programming Language It's a language where the only types are "complex number" and "matrix of complex numbers". In particular, this means you ca

Vue's template compiler reimplemented in Rust!

vue template compiler in Rust https://github.com/vuejs/rfcs/discussions/369#discussioncomment-1192421 Maybe in the long run we want the whole transfor

Vue's template compiler reimplemented in Rust!

Vue's template compiler reimplemented in Rust!

Very overengineered Brainfuck compiler tools

BFVM - The overengineered brainfuck compiler tool Why? just learning about some codegen stuff Why so pathetic? The whole concept is pathetic. This is

Template for Cargo based SysY compiler projects.

基于 Cargo 的 SysY 编译器项目模板 该仓库中存放了一个基于 Cargo 的 SysY 编译器项目的模板, 你可以在该模板的基础上进行进一步的开发. 该仓库中的 Rust 代码实现仅作为演示, 不代表你的编译器必须以此方式实现. 如你需要使用该模板, 建议你删掉所有 Rust 源文件, 仅

A Brainheck compiler written in Rust.

Brainhecc A compiler for Brain[hecc] programs, written in Rust with Cranelift. It compiles any valid Brainhecc program into an executable binary. Inst

zkSnark circuit compiler
zkSnark circuit compiler

Quickstart == Get started here ℹ Important deprecation note The old circom compiler written in Javascript will be frozen, but it can still be downloa

Solidity-Compiler Version Manager

Solidity Compiler Version Manager

ttvm is a runtime and compiler infrastructure written in Rust.

ttvm - Runtime and compiler infrastructure ttvm is a runtime and compiler infrastructure written in Rust. Usage Add the following to your Cargo.toml:

Owner
null
Very overengineered Brainfuck compiler tools

BFVM - The overengineered brainfuck compiler tool Why? just learning about some codegen stuff Why so pathetic? The whole concept is pathetic. This is

MD Gaziur Rahman Noor 11 Jun 5, 2022
A Brainheck compiler written in Rust.

Brainhecc A compiler for Brain[hecc] programs, written in Rust with Cranelift. It compiles any valid Brainhecc program into an executable binary. Inst

Zack 1 Oct 28, 2021
zkSnark circuit compiler

Quickstart ==> Get started here ℹ Important deprecation note The old circom compiler written in Javascript will be frozen, but it can still be downloa

iden3 679 Jan 9, 2023
C-like language compiler, the final project of ZJU Compiler Principle course

cc99 cc99 (not cc98.org) is a C-like language compiler, which is the final project of ZJU Compiler Principle course. It supports many of the C99 langu

Ralph 37 Oct 18, 2022
FlatBuffers compiler (flatc) as API (with focus on transparent `.fbs` to `.rs` code-generation via Cargo build scripts integration)

FlatBuffers flatc API for Rust This crate provides a programmatical way to invoke flatc command (e.g. from build.rs) to generate Rust (or, in fact, an

Vlad Frolov 87 Dec 22, 2022
Compiler for Jade-like template language to cito.js-based virtual dom

Marafet A very experimental DSL for creating (mostly) single page applications in HTML. It's mostly a Jade-like (or Haml-like) templating language wit

Paul Colomiets 11 Jun 25, 2020
Open deep learning compiler stack for cpu, gpu and specialized accelerators

Open Deep Learning Compiler Stack Documentation | Contributors | Community | Release Notes Apache TVM is a compiler stack for deep learning systems. I

The Apache Software Foundation 8.9k Jan 4, 2023
OpenStreetMap flatdata format and compiler

osmflat Flat OpenStreetMap (OSM) data format providing an efficient random data access through memory mapped files. The data format is described and i

null 31 Dec 7, 2022
The hash programming language compiler

The Hash Programming language Run Using the command cargo run hash. This will compile, build and run the program in the current terminal/shell. Submit

Hash 13 Nov 3, 2022