How gorkaerana/meddle works
Main Components
a) Parser Core (Blue Components)
• MDL Grammar Parser
• Lark grammar file (mdl_grammar.lark)
• Parser implementation (parser.py)
• Validation Engine
• Validation rules (validation.json)
• Validator implementation (validation.py)
b) Data Models (Green Components)
• Command Class
• Component Class
• Attribute Class
With their relationships and inheritance patterns
c) Utility Layer (Yellow Components)
• Scraping utilities (scripts/scrape_components.py, scripts/scrape_mdl_files.py)
• Test infrastructure
Flow and Relationships
[MDL Input] → [Parser Core] → [Data Models] → [Validation Engine] → [Validated Output]
Key elements to highlight:
Component Details
a) Parser Core:
• Grammar definition flow
• Parsing stages
• To validation rules
b) Data Models:
• Command structure
• Component hierarchy
• Attribute definitions
• Validation constraints
c) Testing Framework:
• Example MDL files
• Validation test cases
• Benchmark tests
Implementation Details
Technology stack:
• Python implementation
• Lark parser usage
• JSON validation rules
Connections
• Data flow direction
• Validation paths
• Error handling routes
• Test coverage paths
The handling of special cases and limitations
Remember to:
• Both the static structure and dynamic flow
• Validation rules and constraints
• Error handling paths
This will provide a comprehensive view of the MDL parser's architecture while maintaining clarity and technical accuracy.