Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

The custom llvm programming language for fun

NotificationsYou must be signed in to change notification settings

snmslavk/lena-lang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

The language supports converting to IR, using JIT, and all features of LLVM.

Create the code

code_example.lena

extern putchard(char);lenadefines printstar(n)  lenarepeat i = 1, i < n, 1.0 in    putchard(42);  lenadefines fib(x)  lenaif x < 3 lenathen    1  lenaelse    fib(x-1)+fib(x-2);printstar(100);fib(2);fib(4);fib(5);fib(6);

Run

./lena code_example.lena

Try it

You can take the prebuild binaries from the Release

Or you can compile it by youself

How to install llvm on ubuntu

https://apt.llvm.org/

The language compiles with the support of llvm 14

Compile the lang

cd srcclang++ -Xlinker --export-dynamic -g lena.cpp `llvm-config --cxxflags --ldflags --system-libs --libs core orcjit native` -O3 -o lena

[8]ページ先頭

©2009-2025 Movatter.jp