Files
endorphin-aster-vm/crates/frontend/README.md
T
codex-bot 4bf889e5b7
Verify databases and deploy Aster VM / verify-and-deploy (push) Successful in 6m48s
Move PEG grammar into a dedicated source file
2026-10-19 02:56:33 +08:00

13 lines
963 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# frontend
独立源码前端:手写 Rust lexer → token → rust-peg parser → 拥有文本的 AST。当前解析基础函数与表达式,不生成字节码、不进行类型/名称解析、不执行源码。语法是可继续调整的首版实现,当前契约见 [源码前端](../../docs/runtime/frontend.md)。
| 内容 | 职责 |
| --- | --- |
| Cargo.toml | frontend 包与 peg 0.8.6 依赖,不依赖 core、Host 或 Storage |
| [src](src/README.md) | token、源码范围、诊断、AST、词法;PEG 规则独立在 [grammar.peg](src/grammar.peg) |
| [tests](tests/README.md) | Unicode、优先级、函数、完整输入与错误位置验证 |
| [examples](examples/README.md) | 可交给 cli parse 的源码样例 |
公开入口为 lex、parse、parse_expression;CLI 文件读取在宿主层。Core 仍为零外部依赖;未来编译器将 AST 转成已有字节码,不改为 AST 直接解释。返回 [工作区](../README.md)。