diff options
author | Florian Jung <flo@thinkpad.(none)> | 2010-12-29 16:55:25 +0100 |
---|---|---|
committer | Florian Jung <flo@thinkpad.(none)> | 2010-12-29 16:55:25 +0100 |
commit | 7113f02ae87482211aec5046f9ac46c3cc9ad017 (patch) | |
tree | b6484b45317e7e80567d9902cf94843d227ce30e /synth/parser.h |
Initial commit
Diffstat (limited to 'synth/parser.h')
-rw-r--r-- | synth/parser.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/synth/parser.h b/synth/parser.h new file mode 100644 index 0000000..192226e --- /dev/null +++ b/synth/parser.h @@ -0,0 +1,47 @@ +#ifndef __PARSER_H__ +#define __PARSET_H__ + + +#include <set> +#include <map> +#include <list> +#include <string> + +#include "fixed.h" +#include "programs.h" + +using namespace std; + +class Parser +{ + public: + Parser(); + ~Parser(); + void parse(string fn); + program_t get_results() const; + + private: + void init_stuff(); + void uninit_stuff(); + static string extract_array_name(string s); + static list<string> extract_terms(string s); + static list<string> extract_factors(string s); + static list<term_t> extract_formula(string s); + static param_factor_t parse_pfactor(string s); + static int extract_array_index(string s, int dim); + + int n_osc; + oscillator_t *osc; + env_settings_t *env; + set<parameter_t> affect[128]; + map< parameter_t, list<term_t> > formula; + int controller_default[128]; + filter_params_t filter; + + pfactor_formula_t pfactor; + + fixed_t sync_factor; +}; + + +#endif |