コード例 #1
0
 public nlexiEngine(string PATH, Encoding ENCODING)
 {
     //Set up the Streamer
     _path     = PATH;
     _encoding = ENCODING ?? Encoding.Default;
     _reader   = new StreamReader(_path, _encoding);
     //Set up the Locations.
     _currentLocation = new tokenCoordinates();
     _lastLocation    = _currentLocation.DeepCopy();
     //Set up the Stacks.
     _layerStack = new List <layerObject>();
     //Set up the Dictionary.
     _dictionary = new lexiDictionary();
     //Set up the Generated Token Repository.
     _generatedTokens = new List <tokenObject>();
     //Set up the Lexeme.
     _currentLexeme        = "";
     _lastCharacterRead    = '\0';
     _currentCharacterRead = '\0';
     _nextCharacterRead    = (char)_reader.Peek();
     //Set up the Character Streamer.
     AddLayer("DEPTHZERO");
 }
コード例 #2
0
 private void CurrentTokenBeginning()
 {
     _lastLocation = _currentLocation.DeepCopy();
 }