00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef LANGUAGE_TABLE_H
00019 #define LANGUAGE_TABLE_H
00020
00021 #include <sym/token.h>
00022
00023 class LanguageImpl;
00024 class Sym;
00025
00026 class LanguageTable {
00027
00028 LanguageImpl* pimpl;
00029
00030 public:
00031
00032 LanguageTable();
00033 ~LanguageTable();
00034
00035 LanguageTable(const LanguageTable& org);
00036
00037 LanguageTable& operator=(const LanguageTable& org);
00038
00039
00040 typedef Sym (*erc_func)();
00041
00042 void add_function(token_t token, unsigned arity);
00043 void add_function(functor_t functor);
00044 void set_erc(erc_func func);
00045
00046
00047
00048 Sym get_random_var() const;
00049 Sym get_random_const() const;
00050
00051 functor_t get_random_function() const;
00052 token_t get_random_function(token_t org, unsigned arity) const;
00053 };
00054
00055 #endif
00056