public FwXmlOutput(XmlWriter writer, bool fDotrace, PatrParser patr, string patrlexPath) : base(writer) { m_fDotrace = fDotrace; m_patr = patr; m_patrlexPath = patrlexPath; }
public FwXmlOutput(XmlWriter writer, bool fDotrace, PatrParser patr, string patrlexPath, FdoCache cache) : base(writer) { m_fDotrace = fDotrace; m_patr = patr; m_patrlexPath = patrlexPath; m_cache = cache; }
public void LoadLexiconFile() { using (var parser = new PatrParser()) { parser.CommentChar = '|'; parser.CodePage = Encoding.UTF8.CodePage; Assert.NotNull(parser); parser.LoadLexiconFile(LexiconFileName, 1); } }
internal override void InitParser() { CheckDisposed(); m_patr = new PatrParser(); m_patr.CommentChar = '|'; m_patr.CodePage = Encoding.UTF8.CodePage; m_loader = new XmlLoader(); m_loader.XmlResolver = new XmlFwResolver(); m_loader.QuitOnError = false; }
protected override void Dispose(bool disposing) { if (disposing && !IsDisposed) { if (m_patr != null) { m_patr.Dispose(); m_patr = null; } } base.Dispose(disposing); }
public HCParserWorker(FdoCache cache, Action <TaskReport> taskUpdateHandler, IdleQueue idleQueue) : base(cache, taskUpdateHandler, idleQueue, cache.ServiceLocator.GetInstance <ICmAgentRepository>().GetObject(CmAgentTags.kguidAgentHermitCrabParser)) { m_outputDirectory = Path.GetTempPath(); m_patr = new PatrParser { CommentChar = '|', CodePage = Encoding.UTF8.CodePage }; m_loader = new XmlLoader { XmlResolver = new XmlFwResolver(), QuitOnError = false }; }
protected PatrParser CreateAndSetupTestParser() { PatrParser parser = null; try { parser = new PatrParser { CommentChar = '|', CodePage = Encoding.UTF8.CodePage }; Assert.NotNull(parser); parser.LoadGrammarFile(GrammarFileName); parser.LoadLexiconFile(LexiconFileName, 1); return(parser); } catch (Exception) { if (parser != null) { parser.Dispose(); } throw; } }