19 language(rhs.language==nullptr?nullptr:rhs.language->new_language()),
20 filename(rhs.filename)
45 language->convert_lazy_method(
id, symbol_table, message_handler);
53 file.second.language->show_parse(out, message_handler);
64 std::ifstream infile(file.first);
74 languaget &language=*(file.second.language);
76 if(language.
parse(infile, file.first, message_handler))
84 file.second.get_modules();
92 const bool keep_file_local,
99 if(file.second.language->interfaces(symbol_table, message_handler))
105 unsigned collision_counter=0;
112 for(language_filet::modulest::const_iterator
113 mo_it=modules.begin();
114 mo_it!=modules.end();
118 std::string module_name=*mo_it;
127 module.
file=&file.second;
128 module.
name=module_name;
130 std::pair<std::string, language_modulet>(module.
name, module));
138 if(file.second.modules.empty())
140 if(file.second.language->can_keep_file_local())
142 if(file.second.language->typecheck(
143 symbol_table,
"", message_handler, keep_file_local))
148 if(file.second.language->typecheck(symbol_table,
"", message_handler))
154 std::unordered_set<irep_idt> lazy_method_ids;
155 file.second.language->methods_provided(lazy_method_ids);
156 for(
const auto &
id : lazy_method_ids)
166 symbol_table, module.second, keep_file_local, message_handler))
181 if(
languages.insert(file.second.language->id()).second)
182 if(file.second.language->generate_support_functions(
183 symbol_table, message_handler))
196 if(
languages.insert(file.second.language->id()).second)
197 if(file.second.language->final(symbol_table))
210 if(file.second.language->interfaces(symbol_table, message_handler))
219 const std::string &module,
220 const bool keep_file_local,
225 module_mapt::iterator it=
module_map.find(module);
230 log.error() <<
"found no file that provides module " << module
236 symbol_table, it->second, keep_file_local, message_handler);
242 const bool keep_file_local,
264 std::set<std::string> dependency_set;
268 for(std::set<std::string>::const_iterator it=
269 dependency_set.begin();
270 it!=dependency_set.end();
286 symbol_table, module.
name, message_handler, keep_file_local);
291 symbol_table, module.
name, message_handler);
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
bool interfaces(symbol_table_baset &symbol_table, message_handlert &message_handler)
bool parse(message_handlert &message_handler)
bool typecheck_module(symbol_table_baset &symbol_table, language_modulet &module, const bool keep_file_local, message_handlert &message_handler)
bool typecheck(symbol_table_baset &symbol_table, const bool keep_file_local, message_handlert &message_handler)
bool generate_support_functions(symbol_table_baset &symbol_table, message_handlert &message_handler)
lazy_method_mapt lazy_method_map
void show_parse(std::ostream &out, message_handlert &message_handler)
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, message_handlert &message_handler)
std::set< std::string > modulest
std::unique_ptr< languaget > language
virtual bool parse(std::istream &instream, const std::string &path, message_handlert &message_handler)=0
Class that provides messages with a built-in verbosity 'level'.
The symbol table base class interface.
Abstract interface to support a programming language.
std::string to_string(const string_not_contains_constraintt &expr)
Used for debug printing.