/[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 219 by schoenebeck, Tue Aug 17 20:35:04 2004 UTC revision 947 by schoenebeck, Mon Nov 27 21:34:55 2006 UTC
# Line 3  Line 3 
3   *   LinuxSampler - modular, streaming capable sampler                     *   *   LinuxSampler - modular, streaming capable sampler                     *
4   *                                                                         *   *                                                                         *
5   *   Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck   *   *   Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck   *
6     *   Copyright (C) 2005, 2006 Christian Schoenebeck                        *
7   *                                                                         *   *                                                                         *
8   *   This program is free software; you can redistribute it and/or modify  *   *   This program is free software; you can redistribute it and/or modify  *
9   *   it under the terms of the GNU General Public License as published by  *   *   it under the terms of the GNU General Public License as published by  *
# Line 20  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 67  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 stringval digits 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 78  int yylex(YYSTYPE* yylval) { Line 84  int yylex(YYSTYPE* yylval) {
84    
85  //TODO: return more meaningful error messages  //TODO: return more meaningful error messages
86    
87    /*
88      The LSCP specification input file (Documentation/lscp.xml) is automatically
89      updated with this file using the scripts/update_grammar.pl script. Do not
90      modify or delete the GRAMMAR_BNF_BEGIN and GRAMMAR_BNF_END lines !
91    */
92    
93    // GRAMMAR_BNF_BEGIN - do NOT delete or modify this line !!!
94    
95  input                 : line LF  input                 : line LF
96                        | line CR LF                        | line CR LF
97                        ;                        ;
# Line 85  input                 : line LF Line 99  input                 : line LF
99  line                  :  /* epsilon (empty line ignored) */ { return LSCP_DONE; }  line                  :  /* epsilon (empty line ignored) */ { return LSCP_DONE; }
100                        |  comment  { return LSCP_DONE; }                        |  comment  { return LSCP_DONE; }
101                        |  command  { LSCPSERVER->AnswerClient($1); return LSCP_DONE; }                        |  command  { LSCPSERVER->AnswerClient($1); return LSCP_DONE; }
102                        |  error    { LSCPSERVER->AnswerClient("Err:0:Unknown command.\r\n"); RESTART; return LSCP_SYNTAX_ERROR; }                        |  error    { LSCPSERVER->AnswerClient("ERR:0:Unknown command.\r\n"); RESTART; return LSCP_SYNTAX_ERROR; }
103                        ;                        ;
104    
105  comment               :  '#'  comment               :  '#'
# Line 96  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                        |  RESET SP CHANNEL SP sampler_channel   { $$ = LSCPSERVER->ResetChannel($5);                      }                        |  SELECT SP text                        { $$ = LSCPSERVER->QueryDatabase($3);                     }
125                          |  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                        ;                        ;
130    
131  subscribe_event       :  CHANNELS                              { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_channels);     }  subscribe_event       :  CHANNEL_COUNT                         { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_channel_count);     }
132                        |  VOICE_COUNT                           { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_voice_count);  }                        |  VOICE_COUNT                           { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_voice_count);       }
133                        |  STREAM_COUNT                          { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_stream_count); }                        |  STREAM_COUNT                          { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_stream_count);      }
134                        |  BUFFER_FILL                           { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_buffer_fill);  }                        |  BUFFER_FILL                           { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_buffer_fill);       }
135                        |  INFO                                  { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_info);         }                        |  CHANNEL_INFO                          { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_channel_info);      }
136                        |  MISCELLANEOUS                         { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_misc);         }                        |  MISCELLANEOUS                         { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_misc);              }
137                          |  TOTAL_VOICE_COUNT                     { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_total_voice_count); }
138                          ;
139    
140    unsubscribe_event     :  CHANNEL_COUNT                         { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_channel_count);     }
141                          |  VOICE_COUNT                           { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_voice_count);       }
142                          |  STREAM_COUNT                          { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_stream_count);      }
143                          |  BUFFER_FILL                           { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_buffer_fill);       }
144                          |  CHANNEL_INFO                          { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_channel_info);      }
145                          |  MISCELLANEOUS                         { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_misc);              }
146                          |  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  unsubscribe_event     :  CHANNELS                              { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_channels);     }  remove_instruction    :  CHANNEL SP sampler_channel  { $$ = LSCPSERVER->RemoveChannel($3); }
                       |  VOICE_COUNT                           { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_voice_count);  }  
                       |  STREAM_COUNT                          { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_stream_count); }  
                       |  BUFFER_FILL                           { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_buffer_fill);  }  
                       |  INFO                                  { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_info);         }  
                       |  MISCELLANEOUS                         { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_misc);         }  
159                        ;                        ;
160    
161  get_instruction       :  AVAILABLE_ENGINES                                                          { $$ = LSCPSERVER->GetAvailableEngines();                          }  get_instruction       :  AVAILABLE_ENGINES                                                          { $$ = LSCPSERVER->GetAvailableEngines();                          }
# Line 149  get_instruction       :  AVAILABLE_ENGIN Line 181  get_instruction       :  AVAILABLE_ENGIN
181                        |  CHANNEL SP STREAM_COUNT SP sampler_channel                                 { $$ = LSCPSERVER->GetStreamCount($5);                             }                        |  CHANNEL SP STREAM_COUNT SP sampler_channel                                 { $$ = LSCPSERVER->GetStreamCount($5);                             }
182                        |  CHANNEL SP VOICE_COUNT SP sampler_channel                                  { $$ = LSCPSERVER->GetVoiceCount($5);                              }                        |  CHANNEL SP VOICE_COUNT SP sampler_channel                                  { $$ = LSCPSERVER->GetVoiceCount($5);                              }
183                        |  ENGINE SP INFO SP engine_name                                              { $$ = LSCPSERVER->GetEngineInfo($5);                              }                        |  ENGINE SP INFO SP engine_name                                              { $$ = LSCPSERVER->GetEngineInfo($5);                              }
184                          |  SERVER SP INFO                                                             { $$ = LSCPSERVER->GetServerInfo();                                }
185                          |  TOTAL_VOICE_COUNT                                                          { $$ = LSCPSERVER->GetTotalVoiceCount();                                }
186                          |  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             { $$ = LSCPSERVER->SetAudioOutputDeviceParameter($3, $5, $7);      }  set_instruction       :  AUDIO_OUTPUT_DEVICE_PARAMETER SP number SP string '=' param_val_list             { $$ = LSCPSERVER->SetAudioOutputDeviceParameter($3, $5, $7);      }
192                        |  AUDIO_OUTPUT_CHANNEL_PARAMETER SP number SP number SP string '=' param_val  { $$ = LSCPSERVER->SetAudioOutputChannelParameter($3, $5, $7, $9); }                        |  AUDIO_OUTPUT_CHANNEL_PARAMETER SP number SP number SP string '=' param_val_list  { $$ = LSCPSERVER->SetAudioOutputChannelParameter($3, $5, $7, $9); }
193                        |  MIDI_INPUT_DEVICE_PARAMETER SP number SP string '=' param_val               { $$ = LSCPSERVER->SetMidiInputDeviceParameter($3, $5, $7);        }                        |  MIDI_INPUT_DEVICE_PARAMETER SP number SP string '=' param_val_list               { $$ = LSCPSERVER->SetMidiInputDeviceParameter($3, $5, $7);        }
194                        |  MIDI_INPUT_PORT_PARAMETER SP number SP number SP string '=' param_val       { $$ = LSCPSERVER->SetMidiInputPortParameter($3, $5, $7, $9);      }                        |  MIDI_INPUT_PORT_PARAMETER SP number SP number SP string '=' param_val_list       { $$ = LSCPSERVER->SetMidiInputPortParameter($3, $5, $7, $9);      }
195                        |  CHANNEL SP set_chan_instruction                                             { $$ = $3;                                                         }                        |  CHANNEL SP set_chan_instruction                                                  { $$ = $3;                                                         }
196                        |  ECHO SP boolean                                                             { $$ = LSCPSERVER->SetEcho((yyparse_param_t*) yyparse_param, $3);  }                        |  ECHO SP boolean                                                                  { $$ = LSCPSERVER->SetEcho((yyparse_param_t*) yyparse_param, $3);  }
197                        ;                        ;
198    
199  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); }
# Line 165  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 182  set_chan_instruction  :  AUDIO_OUTPUT_DE Line 225  set_chan_instruction  :  AUDIO_OUTPUT_DE
225                        |  MIDI_INPUT_CHANNEL SP sampler_channel SP midi_input_channel_index                                   { $$ = LSCPSERVER->SetMIDIInputChannel($5, $3);       }                        |  MIDI_INPUT_CHANNEL SP sampler_channel SP midi_input_channel_index                                   { $$ = LSCPSERVER->SetMIDIInputChannel($5, $3);       }
226                        |  MIDI_INPUT_TYPE SP sampler_channel SP midi_input_type_name                                          { $$ = LSCPSERVER->SetMIDIInputType($5, $3);          }                        |  MIDI_INPUT_TYPE SP sampler_channel SP midi_input_type_name                                          { $$ = LSCPSERVER->SetMIDIInputType($5, $3);          }
227                        |  VOLUME SP sampler_channel SP volume_value                                                           { $$ = LSCPSERVER->SetVolume($5, $3);                 }                        |  VOLUME SP sampler_channel SP volume_value                                                           { $$ = LSCPSERVER->SetVolume($5, $3);                 }
228                          |  MUTE SP sampler_channel SP boolean                                                                  { $$ = LSCPSERVER->SetChannelMute($5, $3);            }
229                          |  SOLO SP sampler_channel SP boolean                                                                  { $$ = LSCPSERVER->SetChannelSolo($5, $3);            }
230                        ;                        ;
231    
232  key_val_list          :  string '=' param_val                  { $$[$1] = $3;          }  key_val_list          :  string '=' param_val_list                  { $$[$1] = $3;          }
233                        |  key_val_list SP string '=' param_val  { $$ = $1; $$[$3] = $5; }                        |  key_val_list SP string '=' param_val_list  { $$ = $1; $$[$3] = $5; }
234                        ;                        ;
235    
236  buffer_size_type      :  BYTES       { $$ = fill_response_bytes;      }  buffer_size_type      :  BYTES       { $$ = fill_response_bytes;      }
237                        |  PERCENTAGE  { $$ = fill_response_percentage; }                        |  PERCENTAGE  { $$ = fill_response_percentage; }
238                        ;                        ;
239    
240  list_instruction      :  AUDIO_OUTPUT_DEVICES  { $$ = LSCPSERVER->GetAudioOutputDevices(); }  list_instruction      :  AUDIO_OUTPUT_DEVICES            { $$ = LSCPSERVER->GetAudioOutputDevices();           }
241                        |  MIDI_INPUT_DEVICES    { $$ = LSCPSERVER->GetMidiInputDevices();   }                        |  MIDI_INPUT_DEVICES              { $$ = LSCPSERVER->GetMidiInputDevices();             }
242                        |  CHANNELS              { $$ = LSCPSERVER->ListChannels();          }                        |  CHANNELS                        { $$ = LSCPSERVER->ListChannels();                    }
243                          |  AVAILABLE_ENGINES               { $$ = LSCPSERVER->ListAvailableEngines();            }
244                          |  AVAILABLE_MIDI_INPUT_DRIVERS    { $$ = LSCPSERVER->ListAvailableMidiInputDrivers();   }
245                          |  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);       }
250                        |  NON_MODAL SP filename SP instrument_index SP sampler_channel  { $$ = LSCPSERVER->LoadInstrument($3, $5, $7, true); }                        |  NON_MODAL SP filename SP instrument_index SP sampler_channel  { $$ = LSCPSERVER->LoadInstrument($3, $5, $7, true); }
251                        ;                        ;
252    
253  load_engine_args      :  engine_name SP sampler_channel  { $$ = LSCPSERVER->LoadEngine($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
# Line 217  midi_input_port_index     :  number Line 271  midi_input_port_index     :  number
271                            ;                            ;
272    
273  midi_input_channel_index  :  number  midi_input_channel_index  :  number
274                              |  ALL  { $$ = 16; }
275                            ;                            ;
276    
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 238  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
309                              |  param_val_list','param_val  { $$ = $1 + "," + $3; }
310                              ;
311    
312  param_val                 :  string  param_val                 :  string
313                            |  stringval                            |  stringval
314                            |  number     { std::stringstream ss; ss << $1; $$ = ss.str(); }                            |  number            { std::stringstream ss; ss << "\'" << $1 << "\'"; $$ = ss.str(); }
315                            |  dotnum     { std::stringstream ss; ss << $1; $$ = ss.str(); }                            |  dotnum            { std::stringstream ss; ss << "\'" << $1 << "\'"; $$ = ss.str(); }
316                            ;                            ;
317    
318    // GRAMMAR_BNF_END - do NOT delete or modify this line !!!
319    
320    
321  // atomic variable symbol rules  // atomic variable symbol rules
322    
# Line 255  string                :  char          { Line 328  string                :  char          {
328                        |  string char   { $$ = $1 + $2;                  }                        |  string char   { $$ = $1 + $2;                  }
329                        ;                        ;
330    
331  dotnum                :      digits '.' digits  { $$ = atoi(String($1 + "." + $3).c_str());                         }  dotnum                :      digits '.' digits  { $$ = atof(String($1 + "." + $3).c_str());                         }
332                        |  '+' digits '.' digits  { String s = "+"; s += $2; s += "."; s += $4; $$ = atof(s.c_str()); }                        |  '+' digits '.' digits  { String s = "+"; s += $2; s += "."; s += $4; $$ = atof(s.c_str()); }
333                        |  '-' digits '.' digits  { $$ = atof(String("-" + $2 + "." + $4).c_str());                   }                        |  '-' digits '.' digits  { $$ = atof(String("-" + $2 + "." + $4).c_str());                   }
334                        ;                        ;
# Line 291  number                :  digit       { $ Line 364  number                :  digit       { $
364  char                  :  'A' { $$ = 'A'; } | 'B' { $$ = 'B'; } | 'C' { $$ = 'C'; } | 'D' { $$ = 'D'; } | 'E' { $$ = 'E'; } | 'F' { $$ = 'F'; } | 'G' { $$ = 'G'; } | 'H' { $$ = 'H'; } | 'I' { $$ = 'I'; } | 'J' { $$ = 'J'; } | 'K' { $$ = 'K'; } | 'L' { $$ = 'L'; } | 'M' { $$ = 'M'; } | 'N' { $$ = 'N'; } | 'O' { $$ = 'O'; } | 'P' { $$ = 'P'; } | 'Q' { $$ = 'Q'; } | 'R' { $$ = 'R'; } | 'S' { $$ = 'S'; } | 'T' { $$ = 'T'; } | 'U' { $$ = 'U'; } | 'V' { $$ = 'V'; } | 'W' { $$ = 'W'; } | 'X' { $$ = 'X'; } | 'Y' { $$ = 'Y'; } | 'Z' { $$ = 'Z'; }  char                  :  'A' { $$ = 'A'; } | 'B' { $$ = 'B'; } | 'C' { $$ = 'C'; } | 'D' { $$ = 'D'; } | 'E' { $$ = 'E'; } | 'F' { $$ = 'F'; } | 'G' { $$ = 'G'; } | 'H' { $$ = 'H'; } | 'I' { $$ = 'I'; } | 'J' { $$ = 'J'; } | 'K' { $$ = 'K'; } | 'L' { $$ = 'L'; } | 'M' { $$ = 'M'; } | 'N' { $$ = 'N'; } | 'O' { $$ = 'O'; } | 'P' { $$ = 'P'; } | 'Q' { $$ = 'Q'; } | 'R' { $$ = 'R'; } | 'S' { $$ = 'S'; } | 'T' { $$ = 'T'; } | 'U' { $$ = 'U'; } | 'V' { $$ = 'V'; } | 'W' { $$ = 'W'; } | 'X' { $$ = 'X'; } | 'Y' { $$ = 'Y'; } | 'Z' { $$ = 'Z'; }
365                        |  'a' { $$ = 'a'; } | 'b' { $$ = 'b'; } | 'c' { $$ = 'c'; } | 'd' { $$ = 'd'; } | 'e' { $$ = 'e'; } | 'f' { $$ = 'f'; } | 'g' { $$ = 'g'; } | 'h' { $$ = 'h'; } | 'i' { $$ = 'i'; } | 'j' { $$ = 'j'; } | 'k' { $$ = 'k'; } | 'l' { $$ = 'l'; } | 'm' { $$ = 'm'; } | 'n' { $$ = 'n'; } | 'o' { $$ = 'o'; } | 'p' { $$ = 'p'; } | 'q' { $$ = 'q'; } | 'r' { $$ = 'r'; } | 's' { $$ = 's'; } | 't' { $$ = 't'; } | 'u' { $$ = 'u'; } | 'v' { $$ = 'v'; } | 'w' { $$ = 'w'; } | 'x' { $$ = 'x'; } | 'y' { $$ = 'y'; } | 'z' { $$ = 'z'; }                        |  'a' { $$ = 'a'; } | 'b' { $$ = 'b'; } | 'c' { $$ = 'c'; } | 'd' { $$ = 'd'; } | 'e' { $$ = 'e'; } | 'f' { $$ = 'f'; } | 'g' { $$ = 'g'; } | 'h' { $$ = 'h'; } | 'i' { $$ = 'i'; } | 'j' { $$ = 'j'; } | 'k' { $$ = 'k'; } | 'l' { $$ = 'l'; } | 'm' { $$ = 'm'; } | 'n' { $$ = 'n'; } | 'o' { $$ = 'o'; } | 'p' { $$ = 'p'; } | 'q' { $$ = 'q'; } | 'r' { $$ = 'r'; } | 's' { $$ = 's'; } | 't' { $$ = 't'; } | 'u' { $$ = 'u'; } | 'v' { $$ = 'v'; } | 'w' { $$ = 'w'; } | 'x' { $$ = 'x'; } | 'y' { $$ = 'y'; } | 'z' { $$ = 'z'; }
366                        |  '0' { $$ = '0'; } | '1' { $$ = '1'; } | '2' { $$ = '2'; } | '3' { $$ = '3'; } | '4' { $$ = '4'; } | '5' { $$ = '5'; } | '6' { $$ = '6'; } | '7' { $$ = '7'; } | '8' { $$ = '8'; } | '9' { $$ = '9'; }                        |  '0' { $$ = '0'; } | '1' { $$ = '1'; } | '2' { $$ = '2'; } | '3' { $$ = '3'; } | '4' { $$ = '4'; } | '5' { $$ = '5'; } | '6' { $$ = '6'; } | '7' { $$ = '7'; } | '8' { $$ = '8'; } | '9' { $$ = '9'; }
367                        |  '!' { $$ = '!'; } | '#' { $$ = '#'; } | '$' { $$ = '$'; } | '%' { $$ = '%'; } | '&' { $$ = '&'; } | '(' { $$ = '('; } | ')' { $$ = ')'; } | '*' { $$ = '*'; } | '+' { $$ = '+'; } | '-' { $$ = '-'; } | '.' { $$ = '.'; } | '/' { $$ = '/'; }                        |  '!' { $$ = '!'; } | '#' { $$ = '#'; } | '$' { $$ = '$'; } | '%' { $$ = '%'; } | '&' { $$ = '&'; } | '(' { $$ = '('; } | ')' { $$ = ')'; } | '*' { $$ = '*'; } | '+' { $$ = '+'; } | '-' { $$ = '-'; } | '.' { $$ = '.'; } | ',' { $$ = ','; } | '/' { $$ = '/'; }
368                        |  ':' { $$ = ':'; } | ';' { $$ = ';'; } | '<' { $$ = '<'; } | '=' { $$ = '='; } | '>' { $$ = '>'; } | '?' { $$ = '?'; } | '@' { $$ = '@'; }                        |  ':' { $$ = ':'; } | ';' { $$ = ';'; } | '<' { $$ = '<'; } | '=' { $$ = '='; } | '>' { $$ = '>'; } | '?' { $$ = '?'; } | '@' { $$ = '@'; }
369                        |  '[' { $$ = '['; } | '\\' { $$ = '\\'; } | ']' { $$ = ']'; } | '^' { $$ = '^'; } | '_' { $$ = '_'; }                        |  '[' { $$ = '['; } | '\\' { $$ = '\\'; } | ']' { $$ = ']'; } | '^' { $$ = '^'; } | '_' { $$ = '_'; }
370                        |  '{' { $$ = '{'; } | '|' { $$ = '|'; } | '}' { $$ = '}'; } | '~' { $$ = '~'; }                        |  '{' { $$ = '{'; } | '|' { $$ = '|'; } | '}' { $$ = '}'; } | '~' { $$ = '~'; }
# Line 340  char                  :  'A' { $$ = 'A'; Line 413  char                  :  'A' { $$ = 'A';
413                        |  '\376' { $$ = '\376'; } | '\377' { $$ = '\377'; }                        |  '\376' { $$ = '\376'; } | '\377' { $$ = '\377'; }
414                        ;                        ;
415    
416  stringval             :  '\'' string '\''  { $$ = '\'' + $2 + '\''; }  text                  :  SP           { $$ = " ";      }
417                        |  '\"' string '\"'  { $$ = '\"' + $2 + '\"'; }                        |  string
418                          |  text SP      { $$ = $1 + " "; }
419                          |  text string  { $$ = $1 + $2;  }
420                          ;
421    
422    stringval             :  '\'' text '\''  { $$ = $2; }
423                          |  '\"' text '\"'  { $$ = $2; }
424                        ;                        ;
425    
426    
# Line 362  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 374  LIST                  :  'L''I''S''T' Line 462  LIST                  :  'L''I''S''T'
462  LOAD                  :  'L''O''A''D'  LOAD                  :  'L''O''A''D'
463                        ;                        ;
464    
465    ALL                   :  'A''L''L'
466                          ;
467    
468  NON_MODAL             :  'N''O''N''_''M''O''D''A''L'  NON_MODAL             :  'N''O''N''_''M''O''D''A''L'
469                        ;                        ;
470    
# Line 389  SUBSCRIBE             :  'S''U''B''S''C' Line 480  SUBSCRIBE             :  'S''U''B''S''C'
480  UNSUBSCRIBE           :  'U''N''S''U''B''S''C''R''I''B''E'  UNSUBSCRIBE           :  'U''N''S''U''B''S''C''R''I''B''E'
481                        ;                        ;
482    
483    SELECT                :  'S''E''L''E''C''T'
484                          ;
485    
486  CHANNEL               :  'C''H''A''N''N''E''L'  CHANNEL               :  'C''H''A''N''N''E''L'
487                        ;                        ;
488    
# Line 404  CHANNELS             :  'C''H''A''N''N'' Line 498  CHANNELS             :  'C''H''A''N''N''
498  INFO                 :  'I''N''F''O'  INFO                 :  'I''N''F''O'
499                       ;                       ;
500    
501    CHANNEL_COUNT        :  'C''H''A''N''N''E''L''_''C''O''U''N''T'
502                         ;
503    
504    CHANNEL_INFO         :  'C''H''A''N''N''E''L''_''I''N''F''O'
505                         ;
506    
507  BUFFER_FILL          :  'B''U''F''F''E''R''_''F''I''L''L'  BUFFER_FILL          :  'B''U''F''F''E''R''_''F''I''L''L'
508                       ;                       ;
509    
# Line 413  STREAM_COUNT         :  'S''T''R''E''A'' Line 513  STREAM_COUNT         :  'S''T''R''E''A''
513  VOICE_COUNT          :  'V''O''I''C''E''_''C''O''U''N''T'  VOICE_COUNT          :  'V''O''I''C''E''_''C''O''U''N''T'
514                       ;                       ;
515    
516    TOTAL_VOICE_COUNT    :  'T''O''T''A''L''_''V''O''I''C''E''_''C''O''U''N''T'
517                         ;
518    
519    TOTAL_VOICE_COUNT_MAX:  'T''O''T''A''L''_''V''O''I''C''E''_''C''O''U''N''T''_''M''A''X'
520                         ;
521    
522  INSTRUMENT           :  'I''N''S''T''R''U''M''E''N''T'  INSTRUMENT           :  'I''N''S''T''R''U''M''E''N''T'
523                       ;                       ;
524    
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 461  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    
# Line 476  MIDI_INPUT_TYPE       :  'M''I''D''I''_' Line 597  MIDI_INPUT_TYPE       :  'M''I''D''I''_'
597  MIDI_INPUT            :  'M''I''D''I''_''I''N''P''U''T'  MIDI_INPUT            :  'M''I''D''I''_''I''N''P''U''T'
598                        ;                        ;
599    
600    SERVER                :  'S''E''R''V''E''R'
601                          ;
602    
603  VOLUME                :  'V''O''L''U''M''E'  VOLUME                :  'V''O''L''U''M''E'
604                        ;                        ;
605    
606    MUTE                  :  'M''U''T''E'
607                          ;
608    
609    SOLO                  :  'S''O''L''O'
610                          ;
611    
612  BYTES                 :  'B''Y''T''E''S'  BYTES                 :  'B''Y''T''E''S'
613                        ;                        ;
614    

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

  ViewVC Help
Powered by ViewVC