/[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 1161 by iliev, Mon Apr 16 15:51:18 2007 UTC revision 1187 by iliev, Wed May 16 14:22:26 2007 UTC
# Line 73  int yylex(YYSTYPE* yylval) { Line 73  int yylex(YYSTYPE* yylval) {
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 fx_send_id audio_channel_index device_index midi_input_channel_index midi_input_port_index midi_map midi_bank midi_prog midi_ctrl  %type <Number> number sampler_channel instrument_index fx_send_id audio_channel_index device_index midi_input_channel_index midi_input_port_index midi_map midi_bank midi_prog midi_ctrl
76  %type <String> string text stringval digits param_val_list param_val pathname dirname filename map_name entry_name fx_send_name engine_name command add_instruction 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 move_instruction  %type <String> string text stringval digits param_val_list param_val query_val pathname dirname filename map_name entry_name fx_send_name engine_name command add_instruction 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 find_instruction move_instruction copy_instruction
77  %type <FillResponse> buffer_size_type  %type <FillResponse> buffer_size_type
78  %type <KeyValList> key_val_list  %type <KeyValList> key_val_list query_val_list
79  %type <LoadMode> instr_load_mode  %type <LoadMode> instr_load_mode
80  %type <Bool> modal_arg  %type <Bool> modal_arg
81    
# Line 125  command               :  ADD SP add_inst Line 125  command               :  ADD SP add_inst
125                        |  UNSUBSCRIBE SP unsubscribe_event      { $$ = $3;                                                }                        |  UNSUBSCRIBE SP unsubscribe_event      { $$ = $3;                                                }
126                        |  RESET SP reset_instruction            { $$ = $3;                                                }                        |  RESET SP reset_instruction            { $$ = $3;                                                }
127                        |  CLEAR SP clear_instruction            { $$ = $3;                                                }                        |  CLEAR SP clear_instruction            { $$ = $3;                                                }
128                          |  FIND SP find_instruction              { $$ = $3;                                                }
129                        |  MOVE SP move_instruction              { $$ = $3;                                                }                        |  MOVE SP move_instruction              { $$ = $3;                                                }
130                          |  COPY SP copy_instruction              { $$ = $3;                                                }
131                        |  RESET                                 { $$ = LSCPSERVER->ResetSampler();                        }                        |  RESET                                 { $$ = LSCPSERVER->ResetSampler();                        }
132                        |  QUIT                                  { LSCPSERVER->AnswerClient("Bye!\r\n"); return LSCP_QUIT; }                        |  QUIT                                  { LSCPSERVER->AnswerClient("Bye!\r\n"); return LSCP_QUIT; }
133                        ;                        ;
# Line 238  get_instruction       :  AVAILABLE_ENGIN Line 240  get_instruction       :  AVAILABLE_ENGIN
240                        |  MIDI_INSTRUMENT_MAP SP INFO SP midi_map                                    { $$ = LSCPSERVER->GetMidiInstrumentMap($5);                       }                        |  MIDI_INSTRUMENT_MAP SP INFO SP midi_map                                    { $$ = LSCPSERVER->GetMidiInstrumentMap($5);                       }
241                        |  FX_SENDS SP sampler_channel                                                { $$ = LSCPSERVER->GetFxSends($3);                                 }                        |  FX_SENDS SP sampler_channel                                                { $$ = LSCPSERVER->GetFxSends($3);                                 }
242                        |  FX_SEND SP INFO SP sampler_channel SP fx_send_id                           { $$ = LSCPSERVER->GetFxSendInfo($5,$7);                           }                        |  FX_SEND SP INFO SP sampler_channel SP fx_send_id                           { $$ = LSCPSERVER->GetFxSendInfo($5,$7);                           }
243                        |  DB_INSTRUMENT_DIRECTORIES SP pathname                                      { $$ = LSCPSERVER->GetDbInstrumentDirectoryCount($3);              }                        |  DB_INSTRUMENT_DIRECTORIES SP RECURSIVE SP pathname                         { $$ = LSCPSERVER->GetDbInstrumentDirectoryCount($5, true);        }
244                          |  DB_INSTRUMENT_DIRECTORIES SP pathname                                      { $$ = LSCPSERVER->GetDbInstrumentDirectoryCount($3, false);       }
245                        |  DB_INSTRUMENT_DIRECTORY SP INFO SP pathname                                { $$ = LSCPSERVER->GetDbInstrumentDirectoryInfo($5);               }                        |  DB_INSTRUMENT_DIRECTORY SP INFO SP pathname                                { $$ = LSCPSERVER->GetDbInstrumentDirectoryInfo($5);               }
246                        |  DB_INSTRUMENTS SP pathname                                                 { $$ = LSCPSERVER->GetDbInstrumentCount($3);                       }                        |  DB_INSTRUMENTS SP RECURSIVE SP pathname                                    { $$ = LSCPSERVER->GetDbInstrumentCount($5, true);                 }
247                          |  DB_INSTRUMENTS SP pathname                                                 { $$ = LSCPSERVER->GetDbInstrumentCount($3, false);                }
248                        |  DB_INSTRUMENT SP INFO SP pathname                                          { $$ = LSCPSERVER->GetDbInstrumentInfo($5);                        }                        |  DB_INSTRUMENT SP INFO SP pathname                                          { $$ = LSCPSERVER->GetDbInstrumentInfo($5);                        }
249                        |  VOLUME                                                                     { $$ = LSCPSERVER->GetGlobalVolume();                              }                        |  VOLUME                                                                     { $$ = LSCPSERVER->GetGlobalVolume();                              }
250                        ;                        ;
# Line 278  clear_instruction     :  MIDI_INSTRUMENT Line 282  clear_instruction     :  MIDI_INSTRUMENT
282                        |  MIDI_INSTRUMENTS SP ALL        { $$ = LSCPSERVER->ClearAllMidiInstrumentMappings(); }                        |  MIDI_INSTRUMENTS SP ALL        { $$ = LSCPSERVER->ClearAllMidiInstrumentMappings(); }
283                        ;                        ;
284    
285    find_instruction      :  DB_INSTRUMENTS SP NON_RECURSIVE SP pathname SP query_val_list             { $$ = LSCPSERVER->FindDbInstruments($5,$7, false);           }
286                          |  DB_INSTRUMENTS SP pathname SP query_val_list                              { $$ = LSCPSERVER->FindDbInstruments($3,$5, true);            }
287                          |  DB_INSTRUMENT_DIRECTORIES SP NON_RECURSIVE SP pathname SP query_val_list  { $$ = LSCPSERVER->FindDbInstrumentDirectories($5,$7, false); }
288                          |  DB_INSTRUMENT_DIRECTORIES SP pathname SP query_val_list                   { $$ = LSCPSERVER->FindDbInstrumentDirectories($3,$5, true);  }
289                          ;
290    
291  move_instruction      :  DB_INSTRUMENT_DIRECTORY SP pathname SP pathname  { $$ = LSCPSERVER->MoveDbInstrumentDirectory($3,$5); }  move_instruction      :  DB_INSTRUMENT_DIRECTORY SP pathname SP pathname  { $$ = LSCPSERVER->MoveDbInstrumentDirectory($3,$5); }
292                        |  DB_INSTRUMENT SP pathname SP pathname            { $$ = LSCPSERVER->MoveDbInstrument($3,$5);          }                        |  DB_INSTRUMENT SP pathname SP pathname            { $$ = LSCPSERVER->MoveDbInstrument($3,$5);          }
293                        ;                        ;
294    
295    copy_instruction      :  DB_INSTRUMENT_DIRECTORY SP pathname SP pathname  { $$ = LSCPSERVER->CopyDbInstrumentDirectory($3,$5); }
296                          |  DB_INSTRUMENT SP pathname SP pathname            { $$ = LSCPSERVER->CopyDbInstrument($3,$5);          }
297                          ;
298    
299  destroy_instruction   :  AUDIO_OUTPUT_DEVICE SP number  { $$ = LSCPSERVER->DestroyAudioOutputDevice($3); }  destroy_instruction   :  AUDIO_OUTPUT_DEVICE SP number  { $$ = LSCPSERVER->DestroyAudioOutputDevice($3); }
300                        |  MIDI_INPUT_DEVICE SP number    { $$ = LSCPSERVER->DestroyMidiInputDevice($3);   }                        |  MIDI_INPUT_DEVICE SP number    { $$ = LSCPSERVER->DestroyMidiInputDevice($3);   }
301                        |  FX_SEND SP sampler_channel SP fx_send_id  { $$ = LSCPSERVER->DestroyFxSend($3,$5); }                        |  FX_SEND SP sampler_channel SP fx_send_id  { $$ = LSCPSERVER->DestroyFxSend($3,$5); }
# Line 319  buffer_size_type      :  BYTES       { $ Line 333  buffer_size_type      :  BYTES       { $
333                        |  PERCENTAGE  { $$ = fill_response_percentage; }                        |  PERCENTAGE  { $$ = fill_response_percentage; }
334                        ;                        ;
335    
336  list_instruction      :  AUDIO_OUTPUT_DEVICES                  { $$ = LSCPSERVER->GetAudioOutputDevices();           }  list_instruction      :  AUDIO_OUTPUT_DEVICES                               { $$ = LSCPSERVER->GetAudioOutputDevices();              }
337                        |  MIDI_INPUT_DEVICES                    { $$ = LSCPSERVER->GetMidiInputDevices();             }                        |  MIDI_INPUT_DEVICES                                 { $$ = LSCPSERVER->GetMidiInputDevices();                }
338                        |  CHANNELS                              { $$ = LSCPSERVER->ListChannels();                    }                        |  CHANNELS                                           { $$ = LSCPSERVER->ListChannels();                       }
339                        |  AVAILABLE_ENGINES                     { $$ = LSCPSERVER->ListAvailableEngines();            }                        |  AVAILABLE_ENGINES                                  { $$ = LSCPSERVER->ListAvailableEngines();               }
340                        |  AVAILABLE_MIDI_INPUT_DRIVERS          { $$ = LSCPSERVER->ListAvailableMidiInputDrivers();   }                        |  AVAILABLE_MIDI_INPUT_DRIVERS                       { $$ = LSCPSERVER->ListAvailableMidiInputDrivers();      }
341                        |  AVAILABLE_AUDIO_OUTPUT_DRIVERS        { $$ = LSCPSERVER->ListAvailableAudioOutputDrivers(); }                        |  AVAILABLE_AUDIO_OUTPUT_DRIVERS                     { $$ = LSCPSERVER->ListAvailableAudioOutputDrivers();    }
342                        |  MIDI_INSTRUMENTS SP midi_map          { $$ = LSCPSERVER->ListMidiInstrumentMappings($3);    }                        |  MIDI_INSTRUMENTS SP midi_map                       { $$ = LSCPSERVER->ListMidiInstrumentMappings($3);       }
343                        |  MIDI_INSTRUMENTS SP ALL               { $$ = LSCPSERVER->ListAllMidiInstrumentMappings();   }                        |  MIDI_INSTRUMENTS SP ALL                            { $$ = LSCPSERVER->ListAllMidiInstrumentMappings();      }
344                        |  MIDI_INSTRUMENT_MAPS                  { $$ = LSCPSERVER->ListMidiInstrumentMaps();          }                        |  MIDI_INSTRUMENT_MAPS                               { $$ = LSCPSERVER->ListMidiInstrumentMaps();             }
345                        |  FX_SENDS SP sampler_channel           { $$ = LSCPSERVER->ListFxSends($3);                   }                        |  FX_SENDS SP sampler_channel                        { $$ = LSCPSERVER->ListFxSends($3);                      }
346                        |  DB_INSTRUMENT_DIRECTORIES SP pathname { $$ = LSCPSERVER->GetDbInstrumentDirectories($3);    }                        |  DB_INSTRUMENT_DIRECTORIES SP RECURSIVE SP pathname { $$ = LSCPSERVER->GetDbInstrumentDirectories($5, true); }
347                        |  DB_INSTRUMENTS SP pathname            { $$ = LSCPSERVER->GetDbInstruments($3);              }                        |  DB_INSTRUMENT_DIRECTORIES SP pathname              { $$ = LSCPSERVER->GetDbInstrumentDirectories($3);       }
348                          |  DB_INSTRUMENTS SP RECURSIVE SP pathname            { $$ = LSCPSERVER->GetDbInstruments($5, true);           }
349                          |  DB_INSTRUMENTS SP pathname                         { $$ = LSCPSERVER->GetDbInstruments($3);                 }
350                        ;                        ;
351    
352  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 420  param_val                 :  string Line 436  param_val                 :  string
436                            |  dotnum            { std::stringstream ss; ss << "\'" << $1 << "\'"; $$ = ss.str(); }                            |  dotnum            { std::stringstream ss; ss << "\'" << $1 << "\'"; $$ = ss.str(); }
437                            ;                            ;
438    
439    query_val_list            :  string '=' query_val                    { $$[$1] = $3;          }
440                              |  query_val_list SP string '=' query_val  { $$ = $1; $$[$3] = $5; }
441                              ;
442    
443    query_val                 :  string
444                              |  stringval
445                              ;
446    
447  // GRAMMAR_BNF_END - do NOT delete or modify this line !!!  // GRAMMAR_BNF_END - do NOT delete or modify this line !!!
448    
449    
# Line 555  UNMAP                 :  'U''N''M''A''P' Line 579  UNMAP                 :  'U''N''M''A''P'
579  CLEAR                 :  'C''L''E''A''R'  CLEAR                 :  'C''L''E''A''R'
580                        ;                        ;
581    
582    FIND                  :  'F''I''N''D'
583                          ;
584    
585  MOVE                  :  'M''O''V''E'  MOVE                  :  'M''O''V''E'
586                        ;                        ;
587    
588    COPY                  :  'C''O''P''Y'
589                          ;
590    
591  CREATE                :  'C''R''E''A''T''E'  CREATE                :  'C''R''E''A''T''E'
592                        ;                        ;
593    
# Line 789  FORCE                      :  'F''O''R'' Line 819  FORCE                      :  'F''O''R''
819  FLAT                       :  'F''L''A''T'  FLAT                       :  'F''L''A''T'
820                             ;                             ;
821    
822    RECURSIVE                  :  'R''E''C''U''R''S''I''V''E'
823                               ;
824    
825  NON_RECURSIVE              :  'N''O''N''_''R''E''C''U''R''S''I''V''E'  NON_RECURSIVE              :  'N''O''N''_''R''E''C''U''R''S''I''V''E'
826                             ;                             ;
827    

Legend:
Removed from v.1161  
changed lines
  Added in v.1187

  ViewVC Help
Powered by ViewVC