How byexamples/byexample works
Main Components
a) Core Engine Components:
• Parser System
• Finder System
• Executor System
• Runner System
• Extension System
b) Language Support Modules
• Multiple Language Interpreters
• Language-specific Parsers
c) Input/Output Systems
• Documentation Reader
• Output Differ
• Report Generator
Component Relationships
Top Level:
[Documentation Files] → [byexample Core] → [Test Results]
Detailed Core Layer:
[Finder System] → [Parser System] → [Executor System] → [Runner System]
• ↑
• [Extension System]
• ↓
• [Language Support Modules]
Specific Implementation Details
• Rectangles: Core components (blue)
• Rounded rectangles: Language modules (green)
• Hexagons: Extension points (orange)
Key Flows to Highlight
a) Primary Flow:
1. Documentation Input → Finder System
2. Finder → Parser
3. Parser → Executor
4. Executor → Language-specific Runner
5. Runner → Output Comparison
6. Output Comparison → Test Results
b) Extension Flow:
• How the Extension System interfaces with each core component
• Demonstrate language module integration points
Important Architectural Elements
• Modular nature of the language support system
• Extension points for adding new languages
• Concurrent execution capabilities
• Configuration and options system
Implementation Notes
• The plugin architecture for language support
• The event-driven nature of the execution system
• The separation between finding examples and executing them
• The extension mechanism for adding new features
Technical Details
• Support for multiple input formats (Markdown, text files)
• Language interpreter integration points
• Configuration options flow
• Test execution pipeline