/[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 1187 by iliev, Wed May 16 14:22:26 2007 UTC revision 1212 by schoenebeck, Tue May 29 23:59:36 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 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  %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 scan_mode edit_instruction
77  %type <FillResponse> buffer_size_type  %type <FillResponse> buffer_size_type
78  %type <KeyValList> key_val_list query_val_list  %type <KeyValList> key_val_list query_val_list
79  %type <LoadMode> instr_load_mode  %type <LoadMode> instr_load_mode
# Line 128  command               :  ADD SP add_inst Line 128  command               :  ADD SP add_inst
128                        |  FIND SP find_instruction              { $$ = $3;                                                }                        |  FIND SP find_instruction              { $$ = $3;                                                }
129                        |  MOVE SP move_instruction              { $$ = $3;                                                }                        |  MOVE SP move_instruction              { $$ = $3;                                                }
130                        |  COPY SP copy_instruction              { $$ = $3;                                                }                        |  COPY SP copy_instruction              { $$ = $3;                                                }
131                          |  EDIT SP edit_instruction              { $$ = $3;                                                }
132                        |  RESET                                 { $$ = LSCPSERVER->ResetSampler();                        }                        |  RESET                                 { $$ = LSCPSERVER->ResetSampler();                        }
133                        |  QUIT                                  { LSCPSERVER->AnswerClient("Bye!\r\n"); return LSCP_QUIT; }                        |  QUIT                                  { LSCPSERVER->AnswerClient("Bye!\r\n"); return LSCP_QUIT; }
134                        ;                        ;
135    
136  add_instruction       :  CHANNEL                               { $$ = LSCPSERVER->AddChannel();                          }  add_instruction       :  CHANNEL                               { $$ = LSCPSERVER->AddChannel();                          }
137                        |  DB_INSTRUMENT_DIRECTORY SP pathname   { $$ = LSCPSERVER->AddDbInstrumentDirectory($3);          }                        |  DB_INSTRUMENT_DIRECTORY SP pathname   { $$ = LSCPSERVER->AddDbInstrumentDirectory($3);          }
138                        |  DB_INSTRUMENTS SP FLAT SP pathname SP pathname             { $$ = LSCPSERVER->AddDbInstrumentsFlat($5,$7);         }                        |  DB_INSTRUMENTS SP NON_MODAL SP scan_mode SP pathname SP pathname        { $$ = LSCPSERVER->AddDbInstruments($5,$7,$9, true);  }
139                        |  DB_INSTRUMENTS SP NON_RECURSIVE SP pathname SP pathname    { $$ = LSCPSERVER->AddDbInstrumentsNonrecursive($5,$7); }                        |  DB_INSTRUMENTS SP scan_mode SP pathname SP pathname                     { $$ = LSCPSERVER->AddDbInstruments($3,$5,$7);        }
140                        |  DB_INSTRUMENTS SP pathname SP pathname                     { $$ = LSCPSERVER->AddDbInstruments($3,$5);             }                        |  DB_INSTRUMENTS SP NON_MODAL SP pathname SP pathname                     { $$ = LSCPSERVER->AddDbInstruments($5,$7, -1, true); }
141                        |  DB_INSTRUMENTS SP pathname SP pathname SP instrument_index { $$ = LSCPSERVER->AddDbInstruments($3,$5,$7);          }                        |  DB_INSTRUMENTS SP NON_MODAL SP pathname SP pathname SP instrument_index { $$ = LSCPSERVER->AddDbInstruments($5,$7,$9, true);  }
142                          |  DB_INSTRUMENTS SP pathname SP pathname                                  { $$ = LSCPSERVER->AddDbInstruments($3,$5);           }
143                          |  DB_INSTRUMENTS SP pathname SP pathname SP instrument_index              { $$ = LSCPSERVER->AddDbInstruments($3,$5,$7);        }
144                        |  MIDI_INSTRUMENT_MAP                   { $$ = LSCPSERVER->AddMidiInstrumentMap();                }                        |  MIDI_INSTRUMENT_MAP                   { $$ = LSCPSERVER->AddMidiInstrumentMap();                }
145                        |  MIDI_INSTRUMENT_MAP SP map_name       { $$ = LSCPSERVER->AddMidiInstrumentMap($3);              }                        |  MIDI_INSTRUMENT_MAP SP map_name       { $$ = LSCPSERVER->AddMidiInstrumentMap($3);              }
146                        ;                        ;
# Line 161  subscribe_event       :  AUDIO_OUTPUT_DE Line 164  subscribe_event       :  AUDIO_OUTPUT_DE
164                        |  DB_INSTRUMENT_DIRECTORY_INFO          { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_db_instr_dir_info);    }                        |  DB_INSTRUMENT_DIRECTORY_INFO          { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_db_instr_dir_info);    }
165                        |  DB_INSTRUMENT_COUNT                   { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_db_instr_count);       }                        |  DB_INSTRUMENT_COUNT                   { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_db_instr_count);       }
166                        |  DB_INSTRUMENT_INFO                    { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_db_instr_info);        }                        |  DB_INSTRUMENT_INFO                    { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_db_instr_info);        }
167                          |  DB_INSTRUMENTS_JOB_INFO               { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_db_instrs_job_info);   }
168                        |  MISCELLANEOUS                         { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_misc);                 }                        |  MISCELLANEOUS                         { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_misc);                 }
169                        |  TOTAL_VOICE_COUNT                     { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_total_voice_count);    }                        |  TOTAL_VOICE_COUNT                     { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_total_voice_count);    }
170                        |  GLOBAL_INFO                           { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_global_info);          }                        |  GLOBAL_INFO                           { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_global_info);          }
# Line 185  unsubscribe_event     :  AUDIO_OUTPUT_DE Line 189  unsubscribe_event     :  AUDIO_OUTPUT_DE
189                        |  DB_INSTRUMENT_DIRECTORY_INFO          { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_db_instr_dir_info);    }                        |  DB_INSTRUMENT_DIRECTORY_INFO          { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_db_instr_dir_info);    }
190                        |  DB_INSTRUMENT_COUNT                   { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_db_instr_count);       }                        |  DB_INSTRUMENT_COUNT                   { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_db_instr_count);       }
191                        |  DB_INSTRUMENT_INFO                    { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_db_instr_info);        }                        |  DB_INSTRUMENT_INFO                    { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_db_instr_info);        }
192                          |  DB_INSTRUMENTS_JOB_INFO               { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_db_instrs_job_info);   }
193                        |  MISCELLANEOUS                         { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_misc);                 }                        |  MISCELLANEOUS                         { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_misc);                 }
194                        |  TOTAL_VOICE_COUNT                     { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_total_voice_count);    }                        |  TOTAL_VOICE_COUNT                     { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_total_voice_count);    }
195                        |  GLOBAL_INFO                           { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_global_info);          }                        |  GLOBAL_INFO                           { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_global_info);          }
# Line 246  get_instruction       :  AVAILABLE_ENGIN Line 251  get_instruction       :  AVAILABLE_ENGIN
251                        |  DB_INSTRUMENTS SP RECURSIVE SP pathname                                    { $$ = LSCPSERVER->GetDbInstrumentCount($5, true);                 }                        |  DB_INSTRUMENTS SP RECURSIVE SP pathname                                    { $$ = LSCPSERVER->GetDbInstrumentCount($5, true);                 }
252                        |  DB_INSTRUMENTS SP pathname                                                 { $$ = LSCPSERVER->GetDbInstrumentCount($3, false);                }                        |  DB_INSTRUMENTS SP pathname                                                 { $$ = LSCPSERVER->GetDbInstrumentCount($3, false);                }
253                        |  DB_INSTRUMENT SP INFO SP pathname                                          { $$ = LSCPSERVER->GetDbInstrumentInfo($5);                        }                        |  DB_INSTRUMENT SP INFO SP pathname                                          { $$ = LSCPSERVER->GetDbInstrumentInfo($5);                        }
254                          |  DB_INSTRUMENTS_JOB SP INFO SP number                                       { $$ = LSCPSERVER->GetDbInstrumentsJobInfo($5);                    }
255                        |  VOLUME                                                                     { $$ = LSCPSERVER->GetGlobalVolume();                              }                        |  VOLUME                                                                     { $$ = LSCPSERVER->GetGlobalVolume();                              }
256                        ;                        ;
257    
# Line 321  set_chan_instruction  :  AUDIO_OUTPUT_DE Line 327  set_chan_instruction  :  AUDIO_OUTPUT_DE
327                        |  MIDI_INSTRUMENT_MAP SP sampler_channel SP DEFAULT                                                   { $$ = LSCPSERVER->SetChannelMap($3, -2);             }                        |  MIDI_INSTRUMENT_MAP SP sampler_channel SP DEFAULT                                                   { $$ = LSCPSERVER->SetChannelMap($3, -2);             }
328                        ;                        ;
329    
330    edit_instruction      :  INSTRUMENT SP sampler_channel  { $$ = LSCPSERVER->EditSamplerChannelInstrument($3); }
331                          ;
332    
333  modal_arg             :  /* epsilon (empty argument) */  { $$ = true;  }  modal_arg             :  /* epsilon (empty argument) */  { $$ = true;  }
334                        |  NON_MODAL SP                    { $$ = false; }                        |  NON_MODAL SP                    { $$ = false; }
335                        ;                        ;
# Line 444  query_val                 :  string Line 453  query_val                 :  string
453                            |  stringval                            |  stringval
454                            ;                            ;
455    
456    scan_mode                 :  RECURSIVE      { $$ = "RECURSIVE"; }
457                              |  NON_RECURSIVE  { $$ = "NON_RECURSIVE"; }
458                              |  FLAT           { $$ = "FLAT"; }
459                              ;
460    
461  // GRAMMAR_BNF_END - do NOT delete or modify this line !!!  // GRAMMAR_BNF_END - do NOT delete or modify this line !!!
462    
463    
# Line 675  DB_INSTRUMENT_COUNT           :  'D''B'' Line 689  DB_INSTRUMENT_COUNT           :  'D''B''
689  DB_INSTRUMENT_INFO            :  'D''B''_''I''N''S''T''R''U''M''E''N''T''_''I''N''F''O'  DB_INSTRUMENT_INFO            :  'D''B''_''I''N''S''T''R''U''M''E''N''T''_''I''N''F''O'
690                                ;                                ;
691    
692    DB_INSTRUMENTS_JOB_INFO       :  'D''B''_''I''N''S''T''R''U''M''E''N''T''S''_''J''O''B''_''I''N''F''O'
693                                  ;
694    
695  CHANNEL_COUNT        :  'C''H''A''N''N''E''L''_''C''O''U''N''T'  CHANNEL_COUNT        :  'C''H''A''N''N''E''L''_''C''O''U''N''T'
696                       ;                       ;
697    
# Line 810  DB_INSTRUMENTS             :  'D''B''_'' Line 827  DB_INSTRUMENTS             :  'D''B''_''
827  DB_INSTRUMENT              :  'D''B''_''I''N''S''T''R''U''M''E''N''T'  DB_INSTRUMENT              :  'D''B''_''I''N''S''T''R''U''M''E''N''T'
828                             ;                             ;
829    
830    DB_INSTRUMENTS_JOB         :  'D''B''_''I''N''S''T''R''U''M''E''N''T''S''_''J''O''B'
831                               ;
832    
833  DESCRIPTION                :  'D''E''S''C''R''I''P''T''I''O''N'  DESCRIPTION                :  'D''E''S''C''R''I''P''T''I''O''N'
834                             ;                             ;
835    
# Line 846  BYTES                 :  'B''Y''T''E''S' Line 866  BYTES                 :  'B''Y''T''E''S'
866  PERCENTAGE            :  'P''E''R''C''E''N''T''A''G''E'  PERCENTAGE            :  'P''E''R''C''E''N''T''A''G''E'
867                        ;                        ;
868    
869    EDIT                  :  'E''D''I''T'
870                          ;
871    
872  RESET                 :  'R''E''S''E''T'  RESET                 :  'R''E''S''E''T'
873                        ;                        ;
874    

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

  ViewVC Help
Powered by ViewVC