private static string Translate(Parser inputParser, Parser outputParser, string sourceInput) { var inputInstructions = inputParser.GenerateDIL(sourceInput); var sb = new StringBuilder(); foreach (var languageInstruction in inputInstructions.ToArray()) { sb.Append(outputParser.AllowedInstructions.GetBySecond(languageInstruction)); } return sb.ToString(); }
public Compiler(Parser parser, CompilationOptions options = 0) { Parser = parser; Options = options; }