summaryrefslogtreecommitdiff
path: root/note_compiler/parser.h
blob: 3e60051f5cb6a0896541e68b4f6931abd7b9c04f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef __PARSER_H__
#define __PARSET_H__


#include <set>
#include <map>
#include <list>
#include <string>

#include "../synth/fixed.h"
#include "programs.h"

using namespace std;

class Parser
{
	public:
		Parser();
		~Parser();
		void parse(string fn);
		
		program_t get_result();
		
	private:
		void init_stuff();
		void uninit_stuff();
		static string extract_array_name(string s);
		static int extract_array_index(string s, int dim);
		
		int n_osc;
		oscillator_t *osc;
		env_settings_t *env;
		filter_params_t filter;
		
		fixed_t sync_factor;
		bool sync_factor_const;
};


#endif