Commit 5ba11aa
docs: Consolidate compiler architecture into comprehensive guide
Merged and enhanced compiler architecture documentation:
- Consolidated Grue_Compiler_Architecture.md and
GRUE_COMPILER_EXECUTION_ARCHITECTURE.md into single comprehensive
COMPILER_ARCHITECTURE.md (1,231 lines)
- Added complete grammar pattern processing flow with concrete examples:
* Source code → Tokens → AST → IR → Z-Machine bytecode transformation
* Detailed data structure representations at each compilation stage
* Runtime execution flow with parse buffer integration
* Pattern matching strategy and ordering
- Complete example tracing "at" + noun => examine($2) through all phases:
* Lexer tokenization
* Parser AST construction
* Semantic analysis and IR generation
* Code generation with bytecode layout
* Runtime pattern matching and handler execution
- Preserved separation of concerns:
* COMPILER_ARCHITECTURE.md - comprehensive architecture guide
* COMPILER_BUG_PATTERNS.md - gotchas and common mistakes
* GRAMMAR_PATTERN_MATCHING_ANALYSIS.md - deep technical dive
* DEVELOPER_ARCHITECTURE_GUIDE.md - platform-wide overview
- Archived original docs for reference:
* ARCHIVE_Grue_Compiler_Architecture.md
* ARCHIVE_GRUE_COMPILER_EXECUTION_ARCHITECTURE.md
Benefits:
- Single source of truth for compiler architecture
- Complete grammar transformation flow with concrete examples
- Better onboarding for new contributors
- Comprehensive reference for debugging and extending compiler
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent d00baa9 commit 5ba11aa
File tree
3 files changed
+1087
-295
lines changed- docs
3 files changed
+1087
-295
lines changedFile renamed without changes.
File renamed without changes.
0 commit comments