Kaleidoscope

所属分类:编译器/解释器
开发工具:Swift
文件大小:29KB
下载次数:0
上传日期:2015-12-02 16:13:44
上 传 者sh-1993
说明:  用Swift编写并用LLVM编译的简单编程语言
(Simple programming language written in Swift and compiled with LLVM)

文件列表:
Cartfile (186, 2015-12-03)
Cartfile.resolved (319, 2015-12-03)
Carthage (0, 2015-12-03)
Carthage\Checkouts (0, 2015-12-03)
Carthage\Checkouts\Either (0, 2015-12-03)
Carthage\Checkouts\KaleidoscopeLang (0, 2015-12-03)
Carthage\Checkouts\LLVM.swift (0, 2015-12-03)
Carthage\Checkouts\Madness (0, 2015-12-03)
Carthage\Checkouts\Prelude (0, 2015-12-03)
Configuration (0, 2015-12-03)
Configuration\Application-Common.xcconfig (434, 2015-12-03)
Configuration\Common.xcconfig (958, 2015-12-03)
Configuration\Debug.xcconfig (394, 2015-12-03)
Configuration\Kaleidoscope.xcconfig (604, 2015-12-03)
Configuration\Release.xcconfig (269, 2015-12-03)
Kaleidoscope.xcodeproj (0, 2015-12-03)
Kaleidoscope.xcodeproj\project.pbxproj (23769, 2015-12-03)
Kaleidoscope.xcodeproj\project.xcworkspace (0, 2015-12-03)
Kaleidoscope.xcodeproj\project.xcworkspace\contents.xcworkspacedata (157, 2015-12-03)
Kaleidoscope.xcodeproj\xcshareddata (0, 2015-12-03)
Kaleidoscope.xcodeproj\xcshareddata\xcschemes (0, 2015-12-03)
Kaleidoscope.xcodeproj\xcshareddata\xcschemes\Kaleidoscope.xcscheme (3808, 2015-12-03)
Kaleidoscope.xcworkspace (0, 2015-12-03)
Kaleidoscope.xcworkspace\contents.xcworkspacedata (663, 2015-12-03)
Kaleidoscope.xcworkspace\xcshareddata (0, 2015-12-03)
Kaleidoscope.xcworkspace\xcshareddata\WorkspaceSettings.xcsettings (264, 2015-12-03)
Kaleidoscope (0, 2015-12-03)
Kaleidoscope\Analysis.swift (5785, 2015-12-03)
Kaleidoscope\Codegen (0, 2015-12-03)
Kaleidoscope\Codegen\BinaryOperatorCodegen.swift (1465, 2015-12-03)
Kaleidoscope\Codegen\CallCodegen.swift (1439, 2015-12-03)
Kaleidoscope\Codegen\CodegenUtils.swift (572, 2015-12-03)
Kaleidoscope\Codegen\FunctionCodegen.swift (2073, 2015-12-03)
Kaleidoscope\Codegen\MainCodegen.swift (2274, 2015-12-03)
Kaleidoscope\Codegen\NumberCodegen.swift (593, 2015-12-03)
Kaleidoscope\Codegen\PrototypeCodegen.swift (2444, 2015-12-03)
Kaleidoscope\Codegen\VariableCodegen.swift (336, 2015-12-03)
... ...

# Kaleidoscope This is an implementation of (some of) the language from the [LLVM Kaleidoscope tutorial][kaleidoscope]. The project itself does its parsing with [KaleidoscopeLang][kaleidoscope-lang] and codegen using [LLVM.swift][llvm-swift]. ## Getting it running 1. Build LLVM (currently tested with 3.6.2). Homebrew is the easiest way to do this: `brew install llvm` 1. Clone the repository and its submodules 1. In `Carthage/Checkouts/LLVM/LLVM.xcconfig`, set `LLVM_PREFIX` to be the prefix used when building `LLVM`. For homebrew this will typically be `/usr/local/Cellar/llvm/3.6.2`, for you it may be `/usr/local` or similar depending on your setup. 1. Open `Kaleidoscope.xcworkspace` and run it! ## Limitations * There’s currently no way to run the resulting LLVM assembly because there’s no way to represent `main`. See [#4][issue-main]. * There’s no JIT like the Kaleidoscope tutorial has. * This currently only implements up to [Chapter 4][chapter-4] of the Kaleidoscope tutorial [kaleidoscope]: http://llvm.org/docs/tutorial/ [kaleidoscope-lang]: https://github.com/bencochran/KaleidoscopeLang [llvm-swift]: https://github.com/bencochran/LLVM.swift [issue-main]: https://github.com/bencochran/Kaleidoscope/issues/4 [chapter-4]: http://llvm.org/docs/tutorial/LangImpl4.html

近期下载者

相关文件


收藏者