/// ------------------------------------------------------------------------------------ /// <summary> /// Creates the parser. /// </summary> /// <param name="input">The input.</param> /// <returns></returns> /// ------------------------------------------------------------------------------------ private IdhParser CreateParser(string input) { m_Reader = new StringReader(input); var lexer = new IdhLexer(m_Reader); return(new IdhParser(lexer)); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Initializes a new instance of the <see cref="T:IdhCommentProcessor"/> class. /// </summary> /// <param name="fileNames">List of names of IDH files.</param> /// ------------------------------------------------------------------------------------ public IdhCommentProcessor(StringCollection fileNames) { m_Comments = new Dictionary <string, CommentInfo>(); if (fileNames == null || fileNames.Count == 0) { return; } foreach (string fileName in fileNames) { StringBuilder fileContent = new StringBuilder(); using (StreamReader reader = new StreamReader(fileName)) { IdhLexer lexer = new IdhLexer(reader); lexer.setFilename(fileName); IdhParser parser = new IdhParser(lexer); parser.setFilename(fileName); CommentInfo info = parser.idhfile(); foreach (string iface in info.Children.Keys) { m_Comments.Add(iface, info.Children[iface]); } } } CleanupComments(m_Comments); }