private Token ProcessId(char preanalisis) { StringBuilder b = new StringBuilder(preanalisis.ToString()); while (Char.IsLetterOrDigit(reader.Peek())) { preanalisis = reader.Read(); b.Append(preanalisis); } String s = b.ToString(); if (palabras.ContainsKey(s)) { return palabras[s]; } Palabra w = new Palabra(s, TokenType.ID); palabras.Add(s, w); return w; }
private void reservar(Palabra word) { palabras.Add(word.Lexeme, word); }