コード例 #1
0
        public char?NextCh()
        {
            if (buffer == null)
            {
                return(null);
            }

            if (CurrentPosition == buffer.Length)
            {
                WriteNextLineToListing();
                ReadNextLine();

                CurrentRow++;
                errorTable.AddRow();

                if (buffer == null)
                {
                    return(null);
                }
                else
                {
                    CurrentPosition = 0;
                }
            }

            return(buffer[CurrentPosition++]);
        }
コード例 #2
0
        public IOModule(ErrorTable errorTable, string sourceFilename, string listingFilename)
        {
            inputFile       = new StreamReader(sourceFilename);
            listing         = new StreamWriter(listingFilename);
            this.errorTable = errorTable;

            ReadNextLine();
            errorTable.AddRow();
        }