public ScriptLoader(Grammar grammar, PreProcessor preprocessor) : this(ScannerFactory.Default, preprocessor, new LALRParser(grammar), CurrentDirectory) { }
/// <exception cref="ArgumentNullException">rootDirectory is null or empty or whitespace</exception> public ScriptLoader(Scanner scanner, PreProcessor preprocessor, LALRParser parser, string rootDirectory) : this() { if (string.IsNullOrWhiteSpace(rootDirectory)) { throw new ArgumentNullException(nameof(rootDirectory)); } if (!Directory.Exists(rootDirectory)) { Directory.CreateDirectory(rootDirectory); } m_path = rootDirectory; m_scanner = scanner; m_preprocessor = preprocessor; m_parser = parser; }
public ITokenEnumerator FromStream(PreProcessor pre_processor, Stream stream, Encoding enc, bool leaveOpen) { if (pre_processor == null) { throw new ArgumentNullException(nameof(pre_processor)); } if (enc == null) { throw new ArgumentNullException(nameof(enc)); } return(new ScanActionEnumerator( pre_processor.Convert(stream, enc, leaveOpen), sym_table.Pair, ck_table.Pair, handler, typeMap)); }
protected virtual void Dispose(bool disposing) { if (m_preprocessor != null) { m_preprocessor.Dispose(); m_preprocessor = null; } if (m_path != null) { m_scanner.Dispose(); m_parser.Dispose(); m_scanner = null; m_parser = null; m_path = null; m_asmbd = null; m_modbd = null; } }
public ILScriptLoader(Scanner scanner, PreProcessor preprocessor, LALRParser parser, string rootDirectory) : base(scanner, preprocessor, parser, rootDirectory) { }
public ILScriptLoader(Grammar grammar, PreProcessor preprocessor) : base(grammar, preprocessor) { }