Ejemplo n.º 1
0
 private void ExecuteIdentifier(Token token)
 {
     if (!ListaIdentificadores.Contains(token.Lexeme))
     {
         ListaIdentificadores.Add(token.Lexeme);
     }
 }
Ejemplo n.º 2
0
 private void ExecuteIdentifierList()
 {
     foreach (var identificador in ListaIdentificadores)
     {
         if (TabelaSimbolos.ContainsKey(identificador))
         {
             throw new SemanticException(string.Format("{0} já declarado", identificador));
         }
         TabelaSimbolos[identificador] = TipoVariavel;
         AddCode(string.Format(".locals({0} {1})", TipoVariavel, identificador));
     }
     ListaIdentificadores.Clear();
 }