yatlc

所属分类:collect
开发工具:Zig
文件大小:0KB
下载次数:0
上传日期:2023-07-31 06:22:13
上 传 者sh-1993
说明:  yatl编译器,编译器课程项目
(yatl compiler, project for a compiler course)

文件列表:
DOCS.md (4592, 2023-09-18)
build.zig (815, 2023-09-18)
examples/ (0, 2023-09-18)
examples/01_intro.ytl (2112, 2023-09-18)
examples/02_test.ytl (439, 2023-09-18)
examples/03_booleans.ytl (251, 2023-09-18)
examples/04_comparisons.ytl (550, 2023-09-18)
examples/05_arithmetic.ytl (333, 2023-09-18)
examples/06_casts.ytl (534, 2023-09-18)
examples/07_io.ytl (217, 2023-09-18)
examples/08_builtins.ytl (294, 2023-09-18)
examples/09_arrays.ytl (342, 2023-09-18)
examples/args.ytl (483, 2023-09-18)
examples/fibonacci.ytl (1647, 2023-09-18)
examples/lazy_evaluation.ytl (669, 2023-09-18)
examples/palindrome.ytl (1599, 2023-09-18)
examples/stack_calculator.ytl (6157, 2023-09-18)
src/ (0, 2023-09-18)
src/codegen.zig (20852, 2023-09-18)
src/main.zig (6787, 2023-09-18)
src/parser.zig (171800, 2023-09-18)
src/parser_test.zig (2739, 2023-09-18)
src/reporter.zig (2748, 2023-09-18)
src/scanner.zig (18858, 2023-09-18)
src/scanner_test.zig (9823, 2023-09-18)
src/symbols.zig (4510, 2023-09-18)
src/symbols_test.zig (1532, 2023-09-18)
src/tests.zig (641, 2023-09-18)
src/token.zig (6575, 2023-09-18)
src/types.zig (13088, 2023-09-18)
src/types_test.zig (4132, 2023-09-18)
src/utils.zig (617, 2023-09-18)

# yatlc: yet-another-toy-language compiler > This is a repository for the yatl compiler, a project for a compiler course. > yatlc is written in [Zig 0.11.0](https://ziglang.org) and uses LLVM. **yatl is an imperative, statically typed, lexically scoped and memory-unsafe language.** Sample code can be found in the [`/examples`](/examples) directory. See [DOCS](./DOCS.md) for more information. **yatlc is a single-pass compiler**. The recursive descent parser does not explicitely build the abstract syntax tree but directly emits the LLVM IR. ## Building yatlc To build the compiler, run `zig build`, emitting `./zig-out/bin/yatlc` binary. ## Running yatlc To see help, run `./zig-out/bin/yatlc --help`. To compile a yatl program, run `./zig-out/bin/yatlc path/to/file.ytl -o binary_name`. ## Testing `yatlc` To run tests, run `zig test src/tests.zig`. When testing an unexpected compiler error, it is helpful to build yatlc with `zig build -Doptimize=debug` to emit more information during runtime when something happens.

近期下载者

相关文件


收藏者