@Override public void ejecutarSintaxis() throws Exception { if (this.s != null) { if (s.TipoDato() == Simbolo.TipoSimbolo.Cadena) System.out.println(((SymString) s).getValor()); if (s.TipoDato() == Simbolo.TipoSimbolo.Entero) System.out.println(((SymInt) s).getValor()); if (s.TipoDato() == Simbolo.TipoSimbolo.Flotante) System.out.println(((SymInt) s).getValor()); if (s.TipoDato() == Simbolo.TipoSimbolo.Booleano) System.out.println(((SymInt) s).getValor()); } if (this.texto != null) { if (this.texto instanceof PTConcat) { ((PTConcat) this.texto).verificarTablaSimbolos(tab); ((PTConcat) this.texto).ejecutarSintaxis(); System.out.println(((PTConcat) this.texto).getConcatResult()); } else System.out.println(texto); } }
public void definir(Simbolo simbolo) { obterMembros().put(simbolo.nome, simbolo); simbolo.escopo = this; }