How creeper011/yumly works
Yumly is a declarative configuration-language implementation and library: callers load text or files, the native engine processes it, and callers receive evaluated configuration data or intermediate tokens/AST. The Python wrapper exposes stage-limited parsing, validation, and dumping; the repository also has Nim, C, and CLI entry points. The README highlights includes, environment variables, optional type hints, and fail-fast validation. Native phase internals and most serializer/API wiring were not excerpted, so those relationships are shown only where documented or marked unverified.
Main entry points: pipeline.nim Pipeline coordinator · libyumly.nim Native engine · yumly.py Python API · loader.nim Include loader
Components 23
Language interfaces
- Python API
lib/python/yumly/yumly.py - Python AST bridge
lib/python/yumly/bridge.py - Nim API
src/Yumly/api/nim/api.nim - C API
src/Yumly/api/c/c_api.nim - Yumly CLI
utils/yumly_cli.nim
Configuration processing
- Native engine
src/Yumly/libyumly.nim - Pipeline coordinator
src/Yumly/core/pipeline.nim - Tokenizer
src/Yumly/phases/tokenizer/tokenizer.nim - Parser
src/Yumly/phases/parser/parser.nim - Validation
src/Yumly/phases/validator/validate.nim - Evaluator
src/Yumly/phases/evaluator/evaluator.nim - AST and values
src/Yumly/types/ast.nim
Includes and resolution
- Include loader
src/Yumly/phases/includes/loader.nim - Include paths
src/Yumly/phases/includes/path_resolver.nim - Environment loader
src/Yumly/phases/includes/env_loader.nim - Value resolver
src/Yumly/phases/resolver/resolver.nim
Representations and output
- Yumly encoder
src/Yumly/serializers/yumly/encoder.nim - Yumyumy encoder
src/Yumly/serializers/yumyumy/yumyumy_encoder.nim - JSON encoder
src/Yumly/serializers/json/json_encoder.nim - YAML encoder
src/Yumly/serializers/yaml/yaml_encoder.nim - Python serializer
src/Yumly/serializers/python/parser_python.nim - Config result
Other components
- Config author
Connections 23
- Config author → Python API: loads or validates
README.MD - Config author → Nim API: loads config
README.MD - Python API → Native engine: calls native functions
lib/python/yumly/yumly.py - Python API → Python AST bridge: maps intermediate results
lib/python/yumly/yumly.py - Native engine → Pipeline coordinator: delegates processing
- Pipeline coordinator → Tokenizer: runs phase
- Pipeline coordinator → Parser: runs phase
- Pipeline coordinator → Validation: runs phase
- Pipeline coordinator → Evaluator: runs phase
- Pipeline coordinator → Include loader: loads includes
- Include loader → Include paths: resolves paths
- Include loader → Environment loader: loads environment
- Pipeline coordinator → Value resolver: resolves values
- Parser → AST and values: produces syntax tree
- Evaluator → Config result: returns evaluated data
- Nim API → Pipeline coordinator: runs configuration pipeline
- C API → Pipeline coordinator: runs configuration pipeline
- Yumly CLI → Pipeline coordinator: uses language engine
- Native engine → Yumly encoder: encodes Yumly
- Native engine → Yumyumy encoder: encodes internal format
- Native engine → JSON encoder: encodes JSON
- Native engine → YAML encoder: encodes YAML
- Native engine → Python serializer: bridges Python data