How jakemuzy/brian-language works
BrIan is an in-progress compiler for a concurrency-oriented language targeting RISC-V. The user supplies a .b source file; the compiler entry point coordinates tokenization, parsing into an AST, name resolution, and type checking. The implementation also includes symbol tables, namespaces, arena allocation, and diagnostics. The README documents these principal language and compiler capabilities, but the sampled material does not show code-generation implementation or prove the runtime call sequence between individual phases, so those links are left unverified.
Main entry points: Parser.c Parser · Tokenizer.c Tokenizer · NameResolver.c Name resolver · Compiler.c Compile entry
Components 16
Semantic analysis
- Name resolver
src/NameResolver.c - Type checker
src/TypeChecker.c - Symbol table
src/Environment.c - Namespaces
src/Namespace.c - Operator rules
include/OperatorRules.h
Compiler support
- Arena allocator
src/ArenaAllocator.c - Diagnostics
src/ErrorHandler.c - Debug tools
src/DebugTools.c
Compiler control
- Compile entry
src/Compiler.c - CLI entry
src/main.c
Other components
- Programmer
- Brian source
Connections 22
- Programmer → Brian source: writes
README.md - Brian source → CLI entry: provides input
- CLI entry → Compile entry: calls
src/main.c - Compile entry → Tokenizer: runs phase
- Tokenizer → Tokens: produces
- Compile entry → Parser: runs phase
- Parser → Tokenizer: reads tokens
- Parser → AST: builds
- Compile entry → Name resolver: runs phase
- Name resolver → AST: resolves
- Name resolver → Symbol table: uses symbols
- Name resolver → Namespaces: uses namespaces
- Compile entry → Type checker: runs phase
- Type checker → AST: checks
- Type checker → Operator rules: uses rules
- Parser → Arena allocator: allocates in
- Tokenizer → Arena allocator: allocates in
- Name resolver → Arena allocator: allocates in
- Tokenizer → Diagnostics: reports errors
- Parser → Diagnostics: reports errors
- Debug tools → Tokenizer: supports debugging
- Debug tools → Parser: supports debugging