| Crates.io | umjunsik |
| lib.rs | umjunsik |
| version | 0.1.1 |
| created_at | 2025-10-24 16:03:20.079398+00 |
| updated_at | 2025-10-24 16:31:40.940374+00 |
| description | Umjunsik Language compiler targeting Lamina IR |
| homepage | |
| repository | https://github.com/miniex/umjunsik-lang-lamina |
| max_upload_size | |
| id | 1898651 |
| size | 51,840 |
A compiler for Umjunsik Language (엄랭) that targets Lamina IR.
This project compiles Umjunsik Language to Lamina Intermediate Representation. Lamina is a high-performance compiler backend supporting x86_64 and AArch64 architectures.
cargo build --release
cargo run -- <file.umm>
Or use the compiled binary:
./target/release/umjunsik <file.umm>
examples/hello.umm:
어떻게
식...!
이 사람이름이냐ㅋㅋ
examples/multiply.umm:
어떻게
식.. ..!
이 사람이름이냐ㅋㅋ
examples/variable.umm:
어떻게
엄...
엄어어....
식어어!
이 사람이름이냐ㅋㅋ
Explanation:
엄... : Assign 3 to variable 1엄어어.... : Assign 4 to variable 2식어어! : Print variable 2 (outputs 4)examples/printchar.umm:
어떻게
식........... .......ㅋ
식ㅋ
이 사람이름이냐ㅋㅋ
Explanation:
식........... .......ㅋ : Print ASCII character 18식ㅋ : Print newlineexamples/conditional.umm:
어떻게
엄...
동탄어?식.....!
식..!
이 사람이름이냐ㅋㅋ
Explanation:
엄... : Assign 3 to variable 1동탄어?식.....! : If variable 1 is not 0, print 5식..! : Print 2The lexer handles Korean characters and special tokens:
어떻게, 엄, 어, 준, 식, 동탄, 화이팅, 이 사람이름이냐ㅋㅋ어 for variable indexing (e.g., 어어어 = variable 3).) and commas (,) as number literals~ separatorBuilds an Abstract Syntax Tree (AST) with:
Generates optimized Lamina IR:
alloc.ptr.stack, initialized to 0Example output for a simple variable program:
fn @main() -> i64 {
entry:
%var_ptr_0 = alloc.ptr.stack i64 # Only allocate used variables
store.i64 %var_ptr_0, 0
line_1:
%t0 = add.i64 3, 0
store.i64 %var_ptr_0, %t0
%t1 = load.i64 %var_ptr_0
print %t1
ret.i64 0
}
umjunsik-lang-lamina/
├── src/
│ ├── main.rs # Main executable
│ ├── lib.rs # Library root
│ ├── token.rs # Token definitions
│ ├── lexer.rs # Lexer (tokenization)
│ ├── ast.rs # Abstract syntax tree
│ ├── parser.rs # Parser
│ └── codegen.rs # Lamina IR code generator
├── examples/ # Example programs
├── Cargo.toml
└── README.md
Apache License 2.0