44 |
// we provide our own version of yyerror() so we don't have to link against the yacc library |
// we provide our own version of yyerror() so we don't have to link against the yacc library |
45 |
void yyerror(const char* s); |
void yyerror(const char* s); |
46 |
|
|
|
bool background; |
|
47 |
%} |
%} |
48 |
|
|
49 |
// reentrant parser |
// reentrant parser |
54 |
%token <Number> NUMBER |
%token <Number> NUMBER |
55 |
%token <String> STRINGVAL |
%token <String> STRINGVAL |
56 |
%token SP LF CR HASH EQ |
%token SP LF CR HASH EQ |
57 |
%token ADD GET CREATE DESTROY LIST LOAD LOAD_BACKGROUND REMOVE SET SUBSCRIBE UNSUBSCRIBE RESET QUIT |
%token ADD GET CREATE DESTROY LIST LOAD NON_MODAL REMOVE SET SUBSCRIBE UNSUBSCRIBE RESET QUIT |
58 |
%token CHANNEL NOTIFICATION |
%token CHANNEL NOTIFICATION |
59 |
%token AVAILABLE_ENGINES AVAILABLE_AUDIO_OUTPUT_DRIVERS CHANNELS INFO BUFFER_FILL STREAM_COUNT VOICE_COUNT |
%token AVAILABLE_ENGINES AVAILABLE_AUDIO_OUTPUT_DRIVERS CHANNELS INFO BUFFER_FILL STREAM_COUNT VOICE_COUNT |
60 |
%token INSTRUMENT ENGINE |
%token INSTRUMENT ENGINE |
97 |
| CREATE SP create_instruction { $$ = $3; } |
| CREATE SP create_instruction { $$ = $3; } |
98 |
| DESTROY SP destroy_instruction { $$ = $3; } |
| DESTROY SP destroy_instruction { $$ = $3; } |
99 |
| LIST SP list_instruction { $$ = $3; } |
| LIST SP list_instruction { $$ = $3; } |
100 |
| LOAD SP load_instruction { $$ = $3; background = false; } |
| LOAD SP load_instruction { $$ = $3; } |
|
| LOAD_BACKGROUND SP load_instruction { $$ = $3; background = true; } |
|
101 |
| REMOVE SP CHANNEL SP sampler_channel { $$ = LSCPSERVER->RemoveChannel($5); } |
| REMOVE SP CHANNEL SP sampler_channel { $$ = LSCPSERVER->RemoveChannel($5); } |
102 |
| SET SP set_instruction { $$ = $3; } |
| SET SP set_instruction { $$ = $3; } |
103 |
| SUBSCRIBE SP subscribe_event { $$ = $3; } |
| SUBSCRIBE SP subscribe_event { $$ = $3; } |
174 |
list_instruction : AUDIO_OUTPUT_DEVICES { $$ = LSCPSERVER->GetAudioOutputDevices(); } |
list_instruction : AUDIO_OUTPUT_DEVICES { $$ = LSCPSERVER->GetAudioOutputDevices(); } |
175 |
; |
; |
176 |
|
|
177 |
load_instr_args : filename SP instrument_index SP sampler_channel { $$ = LSCPSERVER->LoadInstrument($1, $3, $5, background); } |
load_instr_args : filename SP instrument_index SP sampler_channel { $$ = LSCPSERVER->LoadInstrument($1, $3, $5); } |
178 |
|
| NON_MODAL SP filename SP instrument_index SP sampler_channel { $$ = LSCPSERVER->LoadInstrument($3, $5, $7, true); } |
179 |
; |
; |
180 |
|
|
181 |
load_engine_args : engine_name SP sampler_channel { $$ = LSCPSERVER->LoadEngine($1, $3); } |
load_engine_args : engine_name SP sampler_channel { $$ = LSCPSERVER->LoadEngine($1, $3); } |