summaryrefslogtreecommitdiff
path: root/Orchestrator
diff options
context:
space:
mode:
Diffstat (limited to 'Orchestrator')
-rw-r--r--Orchestrator/Orchestrator.csproj20
-rw-r--r--Orchestrator/Program.cs74
2 files changed, 0 insertions, 94 deletions
diff --git a/Orchestrator/Orchestrator.csproj b/Orchestrator/Orchestrator.csproj
deleted file mode 100644
index 4701bf4..0000000
--- a/Orchestrator/Orchestrator.csproj
+++ /dev/null
@@ -1,20 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-
- <PropertyGroup>
- <OutputType>Exe</OutputType>
- <TargetFramework>net9.0</TargetFramework>
- <ImplicitUsings>enable</ImplicitUsings>
- <Nullable>enable</Nullable>
- </PropertyGroup>
-
- <ItemGroup>
- <PackageReference Include="CommandLineParser" Version="2.9.1" />
- </ItemGroup>
-
- <ItemGroup>
- <ProjectReference Include="..\Assembler\Assembler.csproj" />
- <ProjectReference Include="..\Compiler\Compiler.csproj" />
- <ProjectReference Include="..\Emulator\Emulator.csproj" />
- </ItemGroup>
-
-</Project>
diff --git a/Orchestrator/Program.cs b/Orchestrator/Program.cs
deleted file mode 100644
index c5d7538..0000000
--- a/Orchestrator/Program.cs
+++ /dev/null
@@ -1,74 +0,0 @@
-namespace Orchestrator;
-
-using CommandLine;
-using Q1.Assembler;
-using Q1.Compiler;
-using Q1.Emulator;
-
-class Program
-{
- static void Main(string[] args)
- {
- Parser p = new(with =>
- {
- with.CaseInsensitiveEnumValues = true;
- });
-
- p.ParseArguments<Options>(args).WithParsed(Main);
- }
-
- private static void Main(Options options)
- {
- string compiledFile = Path.ChangeExtension(options.InputFile, "asm");
- string assembledFile = Path.ChangeExtension(options.InputFile, "q1");
-
- if (!options.NoCompile)
- Q1.Compiler.Program.Main(
- new CompilerOptions
- {
- CommentCompilationMode = options.CommentCompilationMode,
- InputFile = options.InputFile,
- OutputFile = compiledFile,
- Verbose = options.Verbose
- });
-
- if (!options.NoAssemble)
- Q1.Assembler.Program.Main(
- new AssemblerOptions
- {
- InputFile = compiledFile,
- OutputFile = assembledFile
- });
-
- if (!options.NoEmulate)
- Q1.Emulator.Program.Main(
- new EmulatorOptions
- {
- InputFile = assembledFile,
- });
- }
-}
-
-class Options
-{
- [Option('i', "input", Required = true, HelpText = "Input file to process.")]
- public string InputFile { get; set; }
-
- [Option(
- 'c', "comment-compilation", Required = false,
- HelpText = "Comments to preserve in the compiled result")]
- public CommentCompilationMode CommentCompilationMode { get; set; } =
- CommentCompilationMode.UserDefined;
-
- [Option("no-compile", HelpText = "Skip compilation")]
- public bool NoCompile { get; set; } = false;
-
- [Option("no-assemble", HelpText = "Skip assembling")]
- public bool NoAssemble { get; set; } = false;
-
- [Option("no-emulate", HelpText = "Skip emulation")]
- public bool NoEmulate { get; set; } = false;
-
- [Option('v', "verbose", HelpText = "Enable verbose output")]
- public bool Verbose { get; set; } = false;
-} \ No newline at end of file