示例#1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LexicalAnalyzer"/> class with the specified file.
 /// </summary>
 /// <param name="filePath">The absolute path of the file to be analyzed.</param>
 public LexicalAnalyzer(string filePath)
 {
     _filePath = filePath;
     _currentPosition.Column = 1;
     _currentPosition.Line = 1;
     _currentPosition.Index = -1;
     _reader = new CharReader(filePath, Encoding.UTF8);
     _reader.CharRead += OnCharRead;
     _tokenCollection = new TokenCollection();
 }