Minotaur - Advanced Compiler-Compiler Platform

Advanced Compiler-Compiler Platform

Minotaur - Advanced Compiler-Compiler Platform

CI/CD Pipeline NuGet Version License: AGPL v3

Minotaur Logo

Minotaur is a powerful compiler-compiler platform that revolutionizes grammar development through automated grammar generation, error-driven refinement, and comprehensive language analysis capabilities.

πŸš€ Key Features

Automated Grammar Generation

Advanced Language Support

Interactive Development Environment

πŸ“¦ Installation

dotnet add package DevelApp.Minotaur

πŸ”§ Quick Start

StepParser Integration

using Minotaur.Parser;
using Minotaur.Plugins;
using Minotaur.Core;

// Create integration with plugin manager
using var integration = new StepParserIntegration();

// Parse source code to cognitive graph
var sourceCode = "var x = 42;";
var cognitiveGraph = await integration.ParseToCognitiveGraphAsync(sourceCode);

// Edit the graph
cognitiveGraph.AddChild(new TerminalNode("comment", "// Generated"));

// Unparse back to code
var csharpPlugin = integration.PluginManager.GetPlugin("csharp");
var regeneratedCode = await csharpPlugin.UnparseAsync(cognitiveGraph);

Cognitive Graph V2 Support

Minotaur supports both V1 and V2 cognitive graphs:

using Minotaur.Parser;

// Automatic version selection (default)
var autoConfig = new ParserConfiguration
{
    GraphVersion = CognitiveGraphVersion.Auto  // Selects V1 or V2 based on project size
};
using var autoIntegration = new StepParserIntegration(autoConfig);

// Force V2 for large projects
var v2Config = new ParserConfiguration
{
    GraphVersion = CognitiveGraphVersion.V2  // Always use V2
};
using var v2Integration = new StepParserIntegration(v2Config);

// Customize thresholds for auto-detection
var integration = new StepParserIntegration();
integration.SizeAnalyzer.LargeProjectLineThreshold = 5000;  // Lines of code
integration.SizeAnalyzer.LargeProjectCharThreshold = 250000;  // Characters
integration.SizeAnalyzer.LargeProjectFileThreshold = 50;  // Number of files

Plugin System

using Minotaur.Plugins;

// Built-in language plugins
using var pluginManager = new LanguagePluginManager();

// Get plugin by language
var csharpPlugin = pluginManager.GetPlugin("csharp");
var jsPlugin = pluginManager.GetPlugin("javascript");
var pythonPlugin = pluginManager.GetPlugin("python");

// Get plugin by file extension
var plugin = pluginManager.GetPluginByExtension(".cs");

// Generate backend rules for compiler-compiler
var backendRules = await csharpPlugin.GenerateCompilerBackendRulesAsync();
Console.WriteLine($"Generated {backendRules.GenerationRules.Count} rules");

πŸ—οΈ Architecture

Core Components

Architectural Separation

πŸ“Š Implementation Status

πŸ§ͺ Testing

# Run all tests
dotnet test src/Minotaur.sln

# Run with coverage
dotnet test src/Minotaur.sln --collect:"XPlat Code Coverage"

πŸ–₯️ Desktop Application

Minotaur is available as a native Linux desktop application using Electron:

cd src/Minotaur.UI.Electron
npm install
npm run dev

Features:

See Electron Desktop App documentation for details.

πŸ“š Documentation

User Guides

Feature Documentation

Historical Documentation

πŸ”— Dependencies

Core Dependencies

πŸ“„ License

This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0) - see the LICENSE file for details.

Special Exception for Generated Output: The copyright owner of Minotaur grants you permission to link, compile, or otherwise combine the output of Minotaur with your own code and distribute the resulting combined work under terms of your choice. This exception applies to any files generated by Minotaur’s code and grammar generation facilities.

🀝 Contributing

Contributions are welcome! Please feel free to open issues or submit pull requests.

🏷️ Releases

πŸ“ˆ Roadmap

Completed βœ…

In Progress 🚧

Planned πŸ“‹