Esempio n. 1
0
        /// Opens the file with the specified name for parsing.
        public void OpenStream(TextReader stream)
        {
            Reset();

            m_source = new LookAheadReader(stream);

            PrepareToParse();
        }
Esempio n. 2
0
        /// Opens the file with the specified name for parsing.
        public void OpenFile(String p_filename)
        {
            Reset();

            m_source = new LookAheadReader(
                new StreamReader(new FileStream(p_filename, FileMode.Open)));

            PrepareToParse();
        }
Esempio n. 3
0
        /// Closes the file opened with <c>OpenFile</c>.
        public void CloseFile()
        {
            // This will automaticly close the FileStream (I think :))
            if (m_source != null)
            {
                m_source.Close();
            }

            m_source = null;
        }