/[svn]/linuxsampler/trunk/src/network/lscp.y
ViewVC logotype

Diff of /linuxsampler/trunk/src/network/lscp.y

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 826 by schoenebeck, Sun Jan 8 20:19:49 2006 UTC revision 947 by schoenebeck, Mon Nov 27 21:34:55 2006 UTC
# Line 21  Line 21 
21   *   MA  02111-1307  USA                                                   *   *   MA  02111-1307  USA                                                   *
22   ***************************************************************************/   ***************************************************************************/
23    
24  /* Note: don't forget to run 'make parser' after you changed this file, */  /* CAUTION: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
25  /*       otherwise the parser will not be regenerated!                  */  /*                                                                         */
26    /*     don't forget to run 'make parser' after you changed this file,      */
27    /*     otherwise the parser will not be regenerated !                      */
28    /*                                                                         */
29    /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
30    
31  %{  %{
32    
# Line 68  int yylex(YYSTYPE* yylval) { Line 72  int yylex(YYSTYPE* yylval) {
72    
73  %type <Char> char digit  %type <Char> char digit
74  %type <Dotnum> dotnum volume_value boolean  %type <Dotnum> dotnum volume_value boolean
75  %type <Number> number sampler_channel instrument_index audio_channel_index device_index midi_input_channel_index midi_input_port_index  %type <Number> number sampler_channel instrument_index audio_channel_index device_index midi_input_channel_index midi_input_port_index midi_bank_msb midi_bank_lsb midi_prog
76  %type <String> string text stringval digits param_val_list 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_name midi_input_type_name set_instruction subscribe_event unsubscribe_event  %type <String> string text stringval digits param_val_list param_val filename entry_name 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_name midi_input_type_name remove_instruction unmap_instruction set_instruction subscribe_event unsubscribe_event map_instruction reset_instruction clear_instruction
77  %type <FillResponse> buffer_size_type  %type <FillResponse> buffer_size_type
78  %type <KeyValList> key_val_list  %type <KeyValList> key_val_list
79    %type <LoadMode> instr_load_mode
80    
81  %start input  %start input
82    
# Line 105  comment               :  '#' Line 110  comment               :  '#'
110                        ;                        ;
111    
112  command               :  ADD SP CHANNEL                        { $$ = LSCPSERVER->AddChannel();                          }  command               :  ADD SP CHANNEL                        { $$ = LSCPSERVER->AddChannel();                          }
113                          |  MAP SP map_instruction                { $$ = $3;                                                }
114                          |  UNMAP SP unmap_instruction            { $$ = $3;                                                }
115                        |  GET SP get_instruction                { $$ = $3;                                                }                        |  GET SP get_instruction                { $$ = $3;                                                }
116                        |  CREATE SP create_instruction          { $$ = $3;                                                }                        |  CREATE SP create_instruction          { $$ = $3;                                                }
117                        |  DESTROY SP destroy_instruction        { $$ = $3;                                                }                        |  DESTROY SP destroy_instruction        { $$ = $3;                                                }
118                        |  LIST SP list_instruction              { $$ = $3;                                                }                        |  LIST SP list_instruction              { $$ = $3;                                                }
119                        |  LOAD SP load_instruction              { $$ = $3;                                                }                        |  LOAD SP load_instruction              { $$ = $3;                                                }
120                        |  REMOVE SP CHANNEL SP sampler_channel  { $$ = LSCPSERVER->RemoveChannel($5);                     }                        |  REMOVE SP remove_instruction          { $$ = $3;                                                }
121                        |  SET SP set_instruction                { $$ = $3;                                                }                        |  SET SP set_instruction                { $$ = $3;                                                }
122                        |  SUBSCRIBE SP subscribe_event          { $$ = $3;                                                }                        |  SUBSCRIBE SP subscribe_event          { $$ = $3;                                                }
123                        |  UNSUBSCRIBE SP unsubscribe_event      { $$ = $3;                                                }                        |  UNSUBSCRIBE SP unsubscribe_event      { $$ = $3;                                                }
124                        |  SELECT SP text                        { $$ = LSCPSERVER->QueryDatabase($3);                     }                        |  SELECT SP text                        { $$ = LSCPSERVER->QueryDatabase($3);                     }
125                        |  RESET SP CHANNEL SP sampler_channel   { $$ = LSCPSERVER->ResetChannel($5);                      }                        |  RESET SP reset_instruction            { $$ = $3;                                                }
126                          |  CLEAR SP clear_instruction            { $$ = $3;                                                }
127                        |  RESET                                 { $$ = LSCPSERVER->ResetSampler();                        }                        |  RESET                                 { $$ = LSCPSERVER->ResetSampler();                        }
128                        |  QUIT                                  { LSCPSERVER->AnswerClient("Bye!\r\n"); return LSCP_QUIT; }                        |  QUIT                                  { LSCPSERVER->AnswerClient("Bye!\r\n"); return LSCP_QUIT; }
129                        ;                        ;
# Line 138  unsubscribe_event     :  CHANNEL_COUNT Line 146  unsubscribe_event     :  CHANNEL_COUNT
146                        |  TOTAL_VOICE_COUNT                     { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_total_voice_count); }                        |  TOTAL_VOICE_COUNT                     { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_total_voice_count); }
147                        ;                        ;
148    
149    map_instruction       :  MIDI_INSTRUMENT SP midi_bank_msb SP midi_bank_lsb SP midi_prog SP engine_name SP filename SP instrument_index SP volume_value { $$ = LSCPSERVER->AddOrReplaceMIDIInstrumentMapping($3,$5,$7,$9,$11,$13,$15,MidiInstrumentMapper::VOID,""); }
150                          |  MIDI_INSTRUMENT SP midi_bank_msb SP midi_bank_lsb SP midi_prog SP engine_name SP filename SP instrument_index SP volume_value SP instr_load_mode { $$ = LSCPSERVER->AddOrReplaceMIDIInstrumentMapping($3,$5,$7,$9,$11,$13,$15,$17,""); }
151                          |  MIDI_INSTRUMENT SP midi_bank_msb SP midi_bank_lsb SP midi_prog SP engine_name SP filename SP instrument_index SP volume_value SP entry_name { $$ = LSCPSERVER->AddOrReplaceMIDIInstrumentMapping($3,$5,$7,$9,$11,$13,$15,MidiInstrumentMapper::VOID,$17); }
152                          |  MIDI_INSTRUMENT SP midi_bank_msb SP midi_bank_lsb SP midi_prog SP engine_name SP filename SP instrument_index SP volume_value SP instr_load_mode SP entry_name { $$ = LSCPSERVER->AddOrReplaceMIDIInstrumentMapping($3,$5,$7,$9,$11,$13,$15,$17,$19); }
153                          ;
154    
155    unmap_instruction     :  MIDI_INSTRUMENT SP midi_bank_msb SP midi_bank_lsb SP midi_prog  { $$ = LSCPSERVER->RemoveMIDIInstrumentMapping($3,$5,$7); }
156                          ;
157    
158    remove_instruction    :  CHANNEL SP sampler_channel  { $$ = LSCPSERVER->RemoveChannel($3); }
159                          ;
160    
161  get_instruction       :  AVAILABLE_ENGINES                                                          { $$ = LSCPSERVER->GetAvailableEngines();                          }  get_instruction       :  AVAILABLE_ENGINES                                                          { $$ = LSCPSERVER->GetAvailableEngines();                          }
162                        |  AVAILABLE_MIDI_INPUT_DRIVERS                                               { $$ = LSCPSERVER->GetAvailableMidiInputDrivers();                 }                        |  AVAILABLE_MIDI_INPUT_DRIVERS                                               { $$ = LSCPSERVER->GetAvailableMidiInputDrivers();                 }
163                        |  MIDI_INPUT_DRIVER SP INFO SP string                                        { $$ = LSCPSERVER->GetMidiInputDriverInfo($5);                     }                        |  MIDI_INPUT_DRIVER SP INFO SP string                                        { $$ = LSCPSERVER->GetMidiInputDriverInfo($5);                     }
# Line 164  get_instruction       :  AVAILABLE_ENGIN Line 184  get_instruction       :  AVAILABLE_ENGIN
184                        |  SERVER SP INFO                                                             { $$ = LSCPSERVER->GetServerInfo();                                }                        |  SERVER SP INFO                                                             { $$ = LSCPSERVER->GetServerInfo();                                }
185                        |  TOTAL_VOICE_COUNT                                                          { $$ = LSCPSERVER->GetTotalVoiceCount();                                }                        |  TOTAL_VOICE_COUNT                                                          { $$ = LSCPSERVER->GetTotalVoiceCount();                                }
186                        |  TOTAL_VOICE_COUNT_MAX                                                      { $$ = LSCPSERVER->GetTotalVoiceCountMax();                        }                        |  TOTAL_VOICE_COUNT_MAX                                                      { $$ = LSCPSERVER->GetTotalVoiceCountMax();                        }
187                          |  MIDI_INSTRUMENTS                                                           { $$ = LSCPSERVER->GetMidiIstrumentMappings();                     }
188                          |  MIDI_INSTRUMENT SP INFO SP midi_bank_msb SP midi_bank_lsb SP midi_prog     { $$ = LSCPSERVER->GetMidiInstrumentMapping($5,$7,$9);             }
189                        ;                        ;
190    
191  set_instruction       :  AUDIO_OUTPUT_DEVICE_PARAMETER SP number SP string '=' param_val_list             { $$ = LSCPSERVER->SetAudioOutputDeviceParameter($3, $5, $7);      }  set_instruction       :  AUDIO_OUTPUT_DEVICE_PARAMETER SP number SP string '=' param_val_list             { $$ = LSCPSERVER->SetAudioOutputDeviceParameter($3, $5, $7);      }
# Line 180  create_instruction    :  AUDIO_OUTPUT_DE Line 202  create_instruction    :  AUDIO_OUTPUT_DE
202                        |  MIDI_INPUT_DEVICE SP string                    { $$ = LSCPSERVER->CreateMidiInputDevice($3);      }                        |  MIDI_INPUT_DEVICE SP string                    { $$ = LSCPSERVER->CreateMidiInputDevice($3);      }
203                        ;                        ;
204    
205    reset_instruction     :  CHANNEL SP sampler_channel  { $$ = LSCPSERVER->ResetChannel($3); }
206                          ;
207    
208    clear_instruction     :  MIDI_INSTRUMENTS  { $$ = LSCPSERVER->ClearMidiInstrumentMappings(); }
209                          ;
210    
211  destroy_instruction   :  AUDIO_OUTPUT_DEVICE SP number  { $$ = LSCPSERVER->DestroyAudioOutputDevice($3); }  destroy_instruction   :  AUDIO_OUTPUT_DEVICE SP number  { $$ = LSCPSERVER->DestroyAudioOutputDevice($3); }
212                        |  MIDI_INPUT_DEVICE SP number    { $$ = LSCPSERVER->DestroyMidiInputDevice($3);   }                        |  MIDI_INPUT_DEVICE SP number    { $$ = LSCPSERVER->DestroyMidiInputDevice($3);   }
213                        ;                        ;
# Line 215  list_instruction      :  AUDIO_OUTPUT_DE Line 243  list_instruction      :  AUDIO_OUTPUT_DE
243                        |  AVAILABLE_ENGINES               { $$ = LSCPSERVER->ListAvailableEngines();            }                        |  AVAILABLE_ENGINES               { $$ = LSCPSERVER->ListAvailableEngines();            }
244                        |  AVAILABLE_MIDI_INPUT_DRIVERS    { $$ = LSCPSERVER->ListAvailableMidiInputDrivers();   }                        |  AVAILABLE_MIDI_INPUT_DRIVERS    { $$ = LSCPSERVER->ListAvailableMidiInputDrivers();   }
245                        |  AVAILABLE_AUDIO_OUTPUT_DRIVERS  { $$ = LSCPSERVER->ListAvailableAudioOutputDrivers(); }                        |  AVAILABLE_AUDIO_OUTPUT_DRIVERS  { $$ = LSCPSERVER->ListAvailableAudioOutputDrivers(); }
246                          |  MIDI_INSTRUMENTS                { $$ = LSCPSERVER->ListMidiInstrumentMappings();      }
247                        ;                        ;
248    
249  load_instr_args       :  filename SP instrument_index SP sampler_channel               { $$ = LSCPSERVER->LoadInstrument($1, $3, $5);       }  load_instr_args       :  filename SP instrument_index SP sampler_channel               { $$ = LSCPSERVER->LoadInstrument($1, $3, $5);       }
# Line 224  load_instr_args       :  filename SP ins Line 253  load_instr_args       :  filename SP ins
253  load_engine_args      :  engine_name SP sampler_channel  { $$ = LSCPSERVER->SetEngineType($1, $3); }  load_engine_args      :  engine_name SP sampler_channel  { $$ = LSCPSERVER->SetEngineType($1, $3); }
254                        ;                        ;
255    
256    instr_load_mode       :  ON_DEMAND       { $$ = MidiInstrumentMapper::ON_DEMAND;      }
257                          |  ON_DEMAND_HOLD  { $$ = MidiInstrumentMapper::ON_DEMAND_HOLD; }
258                          |  PERSISTENT      { $$ = MidiInstrumentMapper::PERSISTENT;     }
259                          ;
260    
261  device_index              :  number  device_index              :  number
262                            ;                            ;
263    
# Line 243  midi_input_channel_index  :  number Line 277  midi_input_channel_index  :  number
277  midi_input_type_name      :  string  midi_input_type_name      :  string
278                            ;                            ;
279    
280    midi_bank_msb             :  number
281                              ;
282    
283    midi_bank_lsb             :  number
284                              ;
285    
286    midi_prog                 :  number
287                              ;
288    
289  volume_value              :  dotnum  volume_value              :  dotnum
290                            |  number  { $$ = $1; }                            |  number  { $$ = $1; }
291                            ;                            ;
# Line 259  engine_name               :  string Line 302  engine_name               :  string
302  filename                  :  stringval  filename                  :  stringval
303                            ;                            ;
304    
305    entry_name                :  stringval
306                              ;
307    
308  param_val_list            :  param_val  param_val_list            :  param_val
309                            |  param_val_list','param_val  { $$ = $1 + "," + $3; }                            |  param_val_list','param_val  { $$ = $1 + "," + $3; }
310                            ;                            ;
# Line 395  ADD                   :  'A''D''D' Line 441  ADD                   :  'A''D''D'
441  GET                   :  'G''E''T'  GET                   :  'G''E''T'
442                        ;                        ;
443    
444    MAP                   :  'M''A''P'
445                          ;
446    
447    UNMAP                 :  'U''N''M''A''P'
448                          ;
449    
450    CLEAR                 :  'C''L''E''A''R'
451                          ;
452    
453  CREATE                :  'C''R''E''A''T''E'  CREATE                :  'C''R''E''A''T''E'
454                        ;                        ;
455    
# Line 470  INSTRUMENT           :  'I''N''S''T''R'' Line 525  INSTRUMENT           :  'I''N''S''T''R''
525  ENGINE               :  'E' 'N' 'G' 'I' 'N' 'E'  ENGINE               :  'E' 'N' 'G' 'I' 'N' 'E'
526                       ;                       ;
527    
528    ON_DEMAND            :  'O''N''_''D''E''M''A''N''D'
529                         ;
530    
531    ON_DEMAND_HOLD       :  'O''N''_''D''E''M''A''N''D''_''H''O''L''D'
532                         ;
533    
534    PERSISTENT           :  'P''E''R''S''I''S''T''E''N''T'
535                         ;
536    
537  AUDIO_OUTPUT_DEVICE_PARAMETER  :  'A''U''D''I''O''_''O''U''T''P''U''T''_''D''E''V''I''C''E''_''P''A''R''A''M''E''T''E''R'  AUDIO_OUTPUT_DEVICE_PARAMETER  :  'A''U''D''I''O''_''O''U''T''P''U''T''_''D''E''V''I''C''E''_''P''A''R''A''M''E''T''E''R'
538                                 ;                                 ;
539    
# Line 512  MIDI_INPUT_DEVICE     :  'M''I''D''I''_' Line 576  MIDI_INPUT_DEVICE     :  'M''I''D''I''_'
576  MIDI_INPUT_DRIVER_PARAMETER  :  'M''I''D''I''_''I''N''P''U''T''_''D''R''I''V''E''R''_''P''A''R''A''M''E''T''E''R'  MIDI_INPUT_DRIVER_PARAMETER  :  'M''I''D''I''_''I''N''P''U''T''_''D''R''I''V''E''R''_''P''A''R''A''M''E''T''E''R'
577                               ;                               ;
578    
579    MIDI_INSTRUMENT  :  'M''I''D''I''_''I''N''S''T''R''U''M''E''N''T'
580                     ;
581    
582    MIDI_INSTRUMENTS  :  'M''I''D''I''_''I''N''S''T''R''U''M''E''N''T''S'
583                      ;
584    
585  MIDI_INPUT_DRIVER     :  'M''I''D''I''_''I''N''P''U''T''_''D''R''I''V''E''R'  MIDI_INPUT_DRIVER     :  'M''I''D''I''_''I''N''P''U''T''_''D''R''I''V''E''R'
586                        ;                        ;
587    

Legend:
Removed from v.826  
changed lines
  Added in v.947

  ViewVC Help
Powered by ViewVC