19 language(rhs.language==nullptr?nullptr:rhs.language->new_language()),
20 filename(rhs.filename)
44 language->convert_lazy_method(
id, symbol_table);
50 file.second.language->show_parse(out);
59 std::ifstream infile(
file.first);
73 error() <<
"Parsing of " <<
file.first <<
" failed" <<
eom;
79 file.second.get_modules();
91 if(
file.second.language->interfaces(symbol_table))
97 unsigned collision_counter=0;
104 for(language_filet::modulest::const_iterator
105 mo_it=modules.begin();
106 mo_it!=modules.end();
110 std::string module_name=*mo_it;
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->typecheck(symbol_table,
""))
137 std::unordered_set<irep_idt> lazy_method_ids;
138 file.second.language->methods_provided(lazy_method_ids);
139 for(
const auto &
id : lazy_method_ids)
163 if(
file.second.language->generate_support_functions(symbol_table))
177 if(
file.second.language->final(symbol_table))
189 if(
file.second.language->interfaces(symbol_table))
198 const std::string &module)
202 module_mapt::iterator it=
module_map.find(module);
206 error() <<
"found no file that provides module " << module <<
eom;
226 error() <<
"circular dependency in " << module.
name <<
eom;
234 std::set<std::string> dependency_set;
238 for(std::set<std::string>::const_iterator it=
239 dependency_set.begin();
240 it!=dependency_set.end();
void convert_lazy_method(const irep_idt &id, symbol_table_baset &symbol_table)
bool final(symbol_table_baset &symbol_table)
void show_parse(std::ostream &out)
std::string to_string(const string_not_contains_constraintt &expr)
Used for debug printing.
bool interfaces(symbol_tablet &symbol_table)
std::set< std::string > modulest
std::unique_ptr< languaget > language
bool typecheck_module(symbol_tablet &symbol_table, language_modulet &module)
Abstract interface to support a programming language.
bool typecheck(symbol_tablet &symbol_table)
lazy_method_mapt lazy_method_map
language_filet(const std::string &filename)
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
~language_filet()
To avoid compiler errors, the complete definition of a pointed-to type must be visible at the point a...
mstreamt & status() const
The symbol table base class interface.
virtual bool parse(std::istream &instream, const std::string &path)=0
bool generate_support_functions(symbol_tablet &symbol_table)