Exemplo n.º 1
0
void POETProgram::set_xformDef(XformVar* xvar, POETCode * code)
{
       XvarSymbolTable::Entry e = xvar->get_entry();
       if (e.get_code() != 0) 
           SYM_ALREADY_DEFINED(e.get_name()->toString(OUTPUT_NO_DEBUG));
       e.set_codeDef(code); 
}
Exemplo n.º 2
0
extern "C" POETCode* make_traceVar(POETCode* name, POETCode* inside)
{ 
  assert(name != 0); 
 try {
  POETCode* res = find_code_or_xform_var(name);
  if (res != 0) SYM_ALREADY_DEFINED(name->toString()); 
  res = find_global_var(name);
  if (res != 0) SYM_ALREADY_DEFINED(name->toString());
  LocalVar* var1 = curfile->make_traceVar(name);
  if (inside != 0) {
     LocalVar* var2 = dynamic_cast<LocalVar*>(inside);
     assert (var1 != 0 && var2 != 0);
     var1->get_entry().set_restr(var2);
  }
  return var1;
  } catch (Error err) { std::cerr << "At line " << yylineno << " of file " << curfile->get_filename() << "\n"; exit(1); }
}