Skip to content

Commit 5578136

Browse files
Claude/ephapax linear types e00 zs (#4)
* feat: Initial Ephapax language implementation Ephapax is a linear type system for safe memory management targeting WebAssembly. This commit includes: Core Implementation: - ephapax-syntax: AST definitions with linear type annotations - ephapax-typing: Linear type checker with region support - ephapax-wasm: WASM code generator with bump allocation - ephapax-runtime: no_std WASM runtime with region management Formal Semantics (Coq): - Syntax.v: Core type and expression definitions - Typing.v: Linear typing rules with context tracking - Semantics.v: Operational semantics and safety theorems Documentation: - Language specification (spec/SPEC.md) - Comprehensive wiki documentation - ROADMAP.md with detailed development plan - CONTRIBUTING.adoc guide Infrastructure: - Cargo workspace with 4 crates - CI/CD workflow for Rust and Coq - EUPL-1.2 license Key features: - Linear types prevent use-after-free and memory leaks - Region-based memory management for bulk deallocation - Second-class borrows for temporary access - Formal proofs in Coq for type safety * feat(frontend): Add lexer and parser for Ephapax language Implements Phase 2 (Language Frontend) of the Ephapax roadmap: - ephapax-lexer: High-performance lexer using logos - Tokenizes all Ephapax syntax (keywords, operators, literals) - Support for nested block comments {- -} - String escape sequence handling - Comprehensive error recovery - 20+ unit tests - ephapax-parser: Parser combinator implementation using chumsky - Complete expression parsing (let, fn, if, region, case, etc.) - Type parsing (base types, String@region, functions, products, sums) - Declaration parsing (fn, type) - Rich error reporting with ariadne - 19 unit tests + doc tests All tests pass successfully. --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent d7195b4 commit 5578136

5 files changed

Lines changed: 1959 additions & 0 deletions

File tree

src/ephapax-lexer/Cargo.toml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# SPDX-License-Identifier: EUPL-1.2
2+
# SPDX-FileCopyrightText: 2025 Jonathan D.A. Jewell
3+
4+
[package]
5+
name = "ephapax-lexer"
6+
description = "Lexer for the Ephapax programming language"
7+
version.workspace = true
8+
edition.workspace = true
9+
rust-version.workspace = true
10+
license.workspace = true
11+
authors.workspace = true
12+
repository.workspace = true
13+
keywords.workspace = true
14+
categories.workspace = true
15+
16+
[dependencies]
17+
logos = { workspace = true }
18+
smol_str = { workspace = true }
19+
thiserror = { workspace = true }
20+
21+
[dev-dependencies]

0 commit comments

Comments
 (0)