Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/technohippy/kaleidoscope.ja
日本語プログラミング言語 on LLVM
https://github.com/technohippy/kaleidoscope.ja
Last synced: 19 days ago
JSON representation
日本語プログラミング言語 on LLVM
- Host: GitHub
- URL: https://github.com/technohippy/kaleidoscope.ja
- Owner: technohippy
- Created: 2013-02-15T16:29:14.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-02-16T13:39:06.000Z (almost 12 years ago)
- Last Synced: 2024-11-24T22:41:50.998Z (3 months ago)
- Size: 125 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 日本語プログラミング言語「カレイドスコープ」
## 概要
LLVMで日本語プログラミング言語作れるのかなと思って試しに[Kaleidoscope](http://llvm.org/docs/tutorial/)の予約語や識別子を日本語にしてみました。
## ファイル説明
* README.md : 本ファイル
* bin/kaleidoscope : コマンド
* src/kaleidoscope\_ja.rb : 日本語プログラミング言語
* src/compat\_ja.rb : C言語の関数を模擬
* src/print.cpp : 組み込み関数定義
* sample/mandel.ksj : マンデルブロ表示プログラム(サンプル)## 使い方
### 組み込み関数の準備
$ clang++ -emit-llvm -S src/print.cpp -o print.ll
$ llvm-as print.ll### REPL開始
$ bin/kaleidoscope
### サンプルの実行
$ bin/kaleidoscope sample/mandel.ksj
### サンプルの実行結果
*******************************************************************************
*******************************************************************************
****************************************++++++*********************************
************************************+++++...++++++*****************************
*********************************++++++++.. ...+++++***************************
*******************************++++++++++.. ..+++++**************************
******************************++++++++++. ..++++++*************************
****************************+++++++++.... ..++++++************************
**************************++++++++....... .....++++***********************
*************************++++++++. . ... .++**********************
***********************++++++++... ++**********************
*********************+++++++++.... .+++*********************
******************+++..+++++.... ..+++********************
**************++++++. .......... +++********************
***********++++++++.. .. .++********************
*********++++++++++... .++++*******************
********++++++++++.. .++++*******************
*******++++++..... ..++++*******************
*******+........ ...++++*******************
*******+... .... ...++++*******************
*******+++++...... ..++++*******************
*******++++++++++... .++++*******************
*********++++++++++... ++++*******************
**********+++++++++.. .. ..++********************
*************++++++.. .......... +++********************
******************+++...+++..... ..+++********************
*********************+++++++++.... ..++*********************
***********************++++++++... +++*********************
*************************+++++++.. . ... .++**********************
**************************++++++++....... ......+++***********************
****************************+++++++++.... ..++++++************************
*****************************++++++++++.. ..++++++*************************
*******************************++++++++++.. ...+++++**************************
*********************************++++++++.. ...+++++***************************
***********************************++++++....+++++*****************************
***************************************++++++++********************************
*******************************************************************************
*******************************************************************************
*******************************************************************************
*******************************************************************************
*******************************************************************************## 参考
* http://llvm.org/docs/tutorial/
* https://github.com/technohippy/Kaleidoscope.rb