feat: implement storybook DSL with template composition and validation
Add complete domain-specific language for authoring narrative content for agent simulations. Features: - Complete parser using LALRPOP + logos lexer - Template composition (includes + multiple inheritance) - Strict mode validation for templates - Reserved keyword protection - Semantic validators (trait ranges, schedule overlaps, life arcs, behaviors) - Name resolution and cross-reference tracking - CLI tool (validate, inspect, query commands) - Query API with filtering - 260 comprehensive tests (unit, integration, property-based) Implementation phases: - Phase 1 (Parser): Complete - Phase 2 (Resolution + Validation): Complete - Phase 3 (Public API + CLI): Complete BREAKING CHANGE: Initial implementation
This commit is contained in:
26
tests/compiler_errors/run_examples.sh
Executable file
26
tests/compiler_errors/run_examples.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
# Script to run all compiler error examples and see the error messages
|
||||
|
||||
cd "$(dirname "$0")/../.."
|
||||
|
||||
echo "════════════════════════════════════════════════════════════════"
|
||||
echo "STORYBOOK COMPILER ERRORS - EXAMPLES"
|
||||
echo "════════════════════════════════════════════════════════════════"
|
||||
echo ""
|
||||
|
||||
for file in tests/compiler_errors/*.sb; do
|
||||
if [ -f "$file" ]; then
|
||||
echo "═══════════════════════════════════════════════════════════════════"
|
||||
echo "File: $(basename "$file")"
|
||||
echo "═══════════════════════════════════════════════════════════════════"
|
||||
cat "$file" | head -3 | tail -2 # Show the comment lines
|
||||
echo ""
|
||||
cargo run --quiet --bin sb -- validate "$file" 2>&1 || true
|
||||
echo ""
|
||||
echo ""
|
||||
fi
|
||||
done
|
||||
|
||||
echo "════════════════════════════════════════════════════════════════"
|
||||
echo "ALL EXAMPLES COMPLETE"
|
||||
echo "════════════════════════════════════════════════════════════════"
|
||||
Reference in New Issue
Block a user