17 language(rhs.language==
nullptr?
nullptr:rhs.language->new_language()),
18 filename(rhs.filename)
42 language->convert_lazy_method(
id, symbol_table);
48 file.second.language->show_parse(out);
71 error() <<
"Parsing of " <<
file.first <<
" failed" <<
eom;
77 file.second.get_modules();
85 const bool keep_file_local)
91 if(
file.second.language->interfaces(symbol_table))
104 for(language_filet::modulest::const_iterator
105 mo_it=modules.begin();
106 mo_it!=modules.end();
119 module.file=&file.second;
120 module.name=module_name;
122 std::pair<std::string, language_modulet>(
module.name,
module));
130 if(
file.second.modules.empty())
132 if(
file.second.language->can_keep_file_local())
134 if(
file.second.language->typecheck(symbol_table,
"", keep_file_local))
139 if(
file.second.language->typecheck(symbol_table,
""))
171 if(
file.second.language->generate_support_functions(symbol_table))
185 if(
file.second.language->final(symbol_table))
197 if(
file.second.language->interfaces(symbol_table))
206 const std::string &
module,
207 const bool keep_file_local)
215 error() <<
"found no file that provides module " <<
module << eom;
225 const bool keep_file_local)
236 error() <<
"circular dependency in " <<
module.name << eom;
240 module.in_progress=true;
246 module.file->language->dependencies(module.name, dependency_set);
248 for(std::set<std::string>::const_iterator it=
253 module.in_progress = !typecheck_module(symbol_table, *it, keep_file_local);
254 if(
module.in_progress ==
false)
260 status() <<
"Type-checking " <<
module.name << eom;
262 if(
module.file->language->can_keep_file_local())
264 module.in_progress = !module.file->language->typecheck(
265 symbol_table, module.name, keep_file_local);
270 !module.file->language->typecheck(symbol_table, module.name);
276 module.type_checked=true;
277 module.in_progress=false;
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
bool typecheck_module(symbol_tablet &symbol_table, language_modulet &module, const bool keep_file_local)
void show_parse(std::ostream &out)
bool typecheck(symbol_tablet &symbol_table, const bool keep_file_local=false)
bool interfaces(symbol_tablet &symbol_table)
lazy_method_mapt lazy_method_map
bool generate_support_functions(symbol_tablet &symbol_table)
bool final(symbol_table_baset &symbol_table)
language_filet(const std::string &filename)
~language_filet()
To avoid compiler errors, the complete definition of a pointed-to type must be visible at the point a...
void convert_lazy_method(const irep_idt &id, symbol_table_baset &symbol_table)
std::set< std::string > modulest
std::unique_ptr< languaget > language
virtual bool parse(std::istream &instream, const std::string &path)=0
mstreamt & status() const
The symbol table base class interface.
Abstract interface to support a programming language.