20 |
* MA 02111-1307 USA * |
* MA 02111-1307 USA * |
21 |
***************************************************************************/ |
***************************************************************************/ |
22 |
|
|
23 |
|
/* Note: don't forget to run 'make parser' after you changed this file, */ |
24 |
|
/* otherwise the parser will not be regenerated! */ |
25 |
|
|
26 |
%{ |
%{ |
27 |
|
|
28 |
#include "lscpparser.h" |
#include "lscpparser.h" |
58 |
%token <Number> NUMBER |
%token <Number> NUMBER |
59 |
%token <String> STRINGVAL |
%token <String> STRINGVAL |
60 |
%token SP LF CR HASH EQ |
%token SP LF CR HASH EQ |
61 |
%token ADD GET CREATE DESTROY LIST LOAD NON_MODAL REMOVE SET SUBSCRIBE UNSUBSCRIBE RESET QUIT |
%token ADD GET CREATE DESTROY LIST LOAD NON_MODAL REMOVE SET SUBSCRIBE UNSUBSCRIBE RESET ECHO QUIT |
62 |
%token CHANNEL NOTIFICATION |
%token CHANNEL NOTIFICATION |
63 |
%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 |
64 |
%token INSTRUMENT ENGINE |
%token INSTRUMENT ENGINE |
67 |
%token BYTES PERCENTAGE |
%token BYTES PERCENTAGE |
68 |
%token MISCELLANEOUS |
%token MISCELLANEOUS |
69 |
|
|
70 |
%type <Dotnum> volume |
%type <Dotnum> volume boolean |
71 |
%type <Number> sampler_channel instrument_index audio_output_channel audio_output_device midi_input_channel midi_input_port midi_input_device |
%type <Number> sampler_channel instrument_index audio_output_channel audio_output_device midi_input_channel midi_input_port midi_input_device |
72 |
%type <String> string param_val filename engine_name command create_instruction destroy_instruction get_instruction list_instruction load_instruction set_chan_instruction load_instr_args load_engine_args audio_output_type midi_input_type set_instruction subscribe_event unsubscribe_event |
%type <String> string param_val filename engine_name command create_instruction destroy_instruction get_instruction list_instruction load_instruction set_chan_instruction load_instr_args load_engine_args audio_output_type midi_input_type set_instruction subscribe_event unsubscribe_event |
73 |
%type <FillResponse> buffer_size_type |
%type <FillResponse> buffer_size_type |
154 |
| MIDI_INPUT_DEVICE_PARAMETER SP NUMBER SP string EQ param_val { $$ = LSCPSERVER->SetMidiInputDeviceParameter($3, $5, $7); } |
| MIDI_INPUT_DEVICE_PARAMETER SP NUMBER SP string EQ param_val { $$ = LSCPSERVER->SetMidiInputDeviceParameter($3, $5, $7); } |
155 |
| MIDI_INPUT_PORT_PARAMETER SP NUMBER SP NUMBER SP string EQ param_val { $$ = LSCPSERVER->SetMidiInputPortParameter($3, $5, $7, $9); } |
| MIDI_INPUT_PORT_PARAMETER SP NUMBER SP NUMBER SP string EQ param_val { $$ = LSCPSERVER->SetMidiInputPortParameter($3, $5, $7, $9); } |
156 |
| CHANNEL SP set_chan_instruction { $$ = $3; } |
| CHANNEL SP set_chan_instruction { $$ = $3; } |
157 |
|
| ECHO SP boolean { $$ = LSCPSERVER->SetEcho((yyparse_param_t*) yyparse_param, $3); } |
158 |
; |
; |
159 |
|
|
160 |
create_instruction : AUDIO_OUTPUT_DEVICE SP string SP key_val_list { $$ = LSCPSERVER->CreateAudioOutputDevice($3,$5); } |
create_instruction : AUDIO_OUTPUT_DEVICE SP string SP key_val_list { $$ = LSCPSERVER->CreateAudioOutputDevice($3,$5); } |
244 |
| DOTNUM { std::stringstream ss; ss << $1; $$ = ss.str(); } |
| DOTNUM { std::stringstream ss; ss << $1; $$ = ss.str(); } |
245 |
; |
; |
246 |
|
|
247 |
|
boolean : NUMBER { $$ = $1; } |
248 |
|
| string { $$ = -1; } |
249 |
|
; |
250 |
|
|
251 |
string : CHAR { std::string s; s = $1; $$ = s; } |
string : CHAR { std::string s; s = $1; $$ = s; } |
252 |
| string CHAR { $$ = $1 + $2; } |
| string CHAR { $$ = $1 + $2; } |
253 |
; |
; |