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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1212 - (hide annotations) (download)
Tue May 29 23:59:36 2007 UTC (16 years, 10 months ago) by schoenebeck
File size: 58292 byte(s)
* added highly experimental support for on-the-fly instrument editing
  within the sampler's process (by using instrument editor plugins),
  you'll notice the new "Registered instrument editors:" message on
  startup, the plugin path can be overridden at compile time with
  ./configure --enable-plugin-dir=/some/dir
* added a new LSCP command "EDIT INSTRUMENT <sampler-channel>" to spawn
  a matching instrument editor for the instrument on the given sampler
  channel (LSCP command syntax might be subject to change soon)
* config.h is not going to be installed along with liblinuxsampler's
  API header files anymore (not necessary anymore)
* take care of $(DESTDIR) when creating the instruments DB on 'make
  install' rule (needed for packaging and cross compilation)
* bumped version to 0.4.0.5cvs

1 schoenebeck 35 /***************************************************************************
2     * *
3     * LinuxSampler - modular, streaming capable sampler *
4     * *
5 schoenebeck 56 * Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck *
6 schoenebeck 1047 * Copyright (C) 2005 - 2007 Christian Schoenebeck *
7 schoenebeck 35 * *
8     * 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 *
10     * the Free Software Foundation; either version 2 of the License, or *
11     * (at your option) any later version. *
12     * *
13     * This program is distributed in the hope that it will be useful, *
14     * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16     * GNU General Public License for more details. *
17     * *
18     * You should have received a copy of the GNU General Public License *
19     * along with this program; if not, write to the Free Software *
20     * Foundation, Inc., 59 Temple Place, Suite 330, Boston, *
21     * MA 02111-1307 USA *
22     ***************************************************************************/
23    
24 schoenebeck 947 /* CAUTION: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
25     /* */
26     /* don't forget to run 'make parser' after you changed this file, */
27     /* otherwise the parser will not be regenerated ! */
28     /* */
29     /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
30 schoenebeck 210
31 schoenebeck 35 %{
32    
33     #include "lscpparser.h"
34     #include "lscpserver.h"
35 senkov 170 #include "lscpevent.h"
36 schoenebeck 35
37     // to save us typing work in the rules action definitions
38     #define LSCPSERVER ((yyparse_param_t*) yyparse_param)->pServer
39    
40 schoenebeck 219 // clears input buffer
41 schoenebeck 35 void restart(yyparse_param_t* pparam, int& yychar);
42     #define RESTART restart((yyparse_param_t*) YYPARSE_PARAM, yychar)
43    
44     // we provide our own version of yyerror() so we don't have to link against the yacc library
45     void yyerror(const char* s);
46    
47 schoenebeck 219 static char buf[1024]; // input buffer to feed the parser with new characters
48     static int bytes = 0; // current number of characters in the input buffer
49     static int ptr = 0; // current position in the input buffer
50    
51     // external reference to the function which actually reads from the socket
52     extern int GetLSCPCommand( void *buf, int max_size);
53    
54     // custom scanner function which reads from the socket
55     int yylex(YYSTYPE* yylval) {
56     // check if we have to read new characters
57     if (ptr >= bytes) {
58     bytes = GetLSCPCommand(buf, 1023);
59     ptr = 0;
60     if (bytes < 0) {
61     bytes = 0;
62     return 0;
63     }
64     }
65     return (int) buf[ptr++];
66     }
67    
68 schoenebeck 35 %}
69    
70     // reentrant parser
71     %pure_parser
72    
73 schoenebeck 219 %type <Char> char digit
74     %type <Dotnum> dotnum volume_value boolean
75 schoenebeck 1001 %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 schoenebeck 1212 %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 schoenebeck 35 %type <FillResponse> buffer_size_type
78 iliev 1187 %type <KeyValList> key_val_list query_val_list
79 schoenebeck 947 %type <LoadMode> instr_load_mode
80 schoenebeck 1047 %type <Bool> modal_arg
81 schoenebeck 35
82     %start input
83    
84     %%
85    
86     //TODO: return more meaningful error messages
87    
88 schoenebeck 573 /*
89 schoenebeck 973 The LSCP specification document input file (Documentation/lscp.xml) is
90     automatically updated with this file using the scripts/update_grammar.pl
91     script. Do not modify or delete the GRAMMAR_BNF_BEGIN and GRAMMAR_BNF_END
92     lines !
93 schoenebeck 573 */
94    
95     // GRAMMAR_BNF_BEGIN - do NOT delete or modify this line !!!
96    
97 senkov 170 input : line LF
98 schoenebeck 219 | line CR LF
99     ;
100 schoenebeck 35
101 senkov 170 line : /* epsilon (empty line ignored) */ { return LSCP_DONE; }
102     | comment { return LSCP_DONE; }
103     | command { LSCPSERVER->AnswerClient($1); return LSCP_DONE; }
104 schoenebeck 555 | error { LSCPSERVER->AnswerClient("ERR:0:Unknown command.\r\n"); RESTART; return LSCP_SYNTAX_ERROR; }
105 schoenebeck 35 ;
106    
107 schoenebeck 219 comment : '#'
108     | comment '#'
109 schoenebeck 111 | comment SP
110 schoenebeck 219 | comment number
111 schoenebeck 111 | comment string
112     ;
113    
114 schoenebeck 973 command : ADD SP add_instruction { $$ = $3; }
115 schoenebeck 947 | MAP SP map_instruction { $$ = $3; }
116     | UNMAP SP unmap_instruction { $$ = $3; }
117 schoenebeck 219 | GET SP get_instruction { $$ = $3; }
118     | CREATE SP create_instruction { $$ = $3; }
119     | DESTROY SP destroy_instruction { $$ = $3; }
120     | LIST SP list_instruction { $$ = $3; }
121     | LOAD SP load_instruction { $$ = $3; }
122 schoenebeck 947 | REMOVE SP remove_instruction { $$ = $3; }
123 schoenebeck 219 | SET SP set_instruction { $$ = $3; }
124     | SUBSCRIBE SP subscribe_event { $$ = $3; }
125     | UNSUBSCRIBE SP unsubscribe_event { $$ = $3; }
126 schoenebeck 947 | RESET SP reset_instruction { $$ = $3; }
127     | CLEAR SP clear_instruction { $$ = $3; }
128 iliev 1187 | FIND SP find_instruction { $$ = $3; }
129 iliev 1161 | MOVE SP move_instruction { $$ = $3; }
130 iliev 1187 | COPY SP copy_instruction { $$ = $3; }
131 schoenebeck 1212 | EDIT SP edit_instruction { $$ = $3; }
132 schoenebeck 219 | RESET { $$ = LSCPSERVER->ResetSampler(); }
133     | QUIT { LSCPSERVER->AnswerClient("Bye!\r\n"); return LSCP_QUIT; }
134 schoenebeck 35 ;
135    
136 schoenebeck 973 add_instruction : CHANNEL { $$ = LSCPSERVER->AddChannel(); }
137 iliev 1161 | DB_INSTRUMENT_DIRECTORY SP pathname { $$ = LSCPSERVER->AddDbInstrumentDirectory($3); }
138 iliev 1200 | DB_INSTRUMENTS SP NON_MODAL SP scan_mode SP pathname SP pathname { $$ = LSCPSERVER->AddDbInstruments($5,$7,$9, true); }
139     | DB_INSTRUMENTS SP scan_mode SP pathname SP pathname { $$ = LSCPSERVER->AddDbInstruments($3,$5,$7); }
140     | DB_INSTRUMENTS SP NON_MODAL SP pathname SP pathname { $$ = LSCPSERVER->AddDbInstruments($5,$7, -1, true); }
141     | 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 schoenebeck 973 | MIDI_INSTRUMENT_MAP { $$ = LSCPSERVER->AddMidiInstrumentMap(); }
145     | MIDI_INSTRUMENT_MAP SP map_name { $$ = LSCPSERVER->AddMidiInstrumentMap($3); }
146     ;
147    
148 iliev 981 subscribe_event : AUDIO_OUTPUT_DEVICE_COUNT { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_audio_device_count); }
149     | AUDIO_OUTPUT_DEVICE_INFO { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_audio_device_info); }
150     | MIDI_INPUT_DEVICE_COUNT { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_midi_device_count); }
151     | MIDI_INPUT_DEVICE_INFO { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_midi_device_info); }
152     | CHANNEL_COUNT { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_channel_count); }
153     | VOICE_COUNT { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_voice_count); }
154     | STREAM_COUNT { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_stream_count); }
155     | BUFFER_FILL { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_buffer_fill); }
156     | CHANNEL_INFO { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_channel_info); }
157 iliev 1108 | FX_SEND_COUNT { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_fx_send_count); }
158     | FX_SEND_INFO { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_fx_send_info); }
159 iliev 981 | MIDI_INSTRUMENT_MAP_COUNT { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_midi_instr_map_count); }
160     | MIDI_INSTRUMENT_MAP_INFO { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_midi_instr_map_info); }
161     | MIDI_INSTRUMENT_COUNT { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_midi_instr_count); }
162     | MIDI_INSTRUMENT_INFO { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_midi_instr_info); }
163 iliev 1161 | DB_INSTRUMENT_DIRECTORY_COUNT { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_db_instr_dir_count); }
164     | DB_INSTRUMENT_DIRECTORY_INFO { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_db_instr_dir_info); }
165     | DB_INSTRUMENT_COUNT { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_db_instr_count); }
166     | DB_INSTRUMENT_INFO { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_db_instr_info); }
167 iliev 1200 | DB_INSTRUMENTS_JOB_INFO { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_db_instrs_job_info); }
168 iliev 981 | MISCELLANEOUS { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_misc); }
169     | TOTAL_VOICE_COUNT { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_total_voice_count); }
170 iliev 1108 | GLOBAL_INFO { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_global_info); }
171 senkov 135 ;
172    
173 iliev 981 unsubscribe_event : AUDIO_OUTPUT_DEVICE_COUNT { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_audio_device_count); }
174     | AUDIO_OUTPUT_DEVICE_INFO { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_audio_device_info); }
175     | MIDI_INPUT_DEVICE_COUNT { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_midi_device_count); }
176     | MIDI_INPUT_DEVICE_INFO { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_midi_device_info); }
177     | CHANNEL_COUNT { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_channel_count); }
178     | VOICE_COUNT { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_voice_count); }
179     | STREAM_COUNT { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_stream_count); }
180     | BUFFER_FILL { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_buffer_fill); }
181     | CHANNEL_INFO { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_channel_info); }
182 iliev 1108 | FX_SEND_COUNT { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_fx_send_count); }
183     | FX_SEND_INFO { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_fx_send_info); }
184 iliev 981 | MIDI_INSTRUMENT_MAP_COUNT { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_midi_instr_map_count); }
185     | MIDI_INSTRUMENT_MAP_INFO { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_midi_instr_map_info); }
186     | MIDI_INSTRUMENT_COUNT { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_midi_instr_count); }
187     | MIDI_INSTRUMENT_INFO { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_midi_instr_info); }
188 iliev 1161 | DB_INSTRUMENT_DIRECTORY_COUNT { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_db_instr_dir_count); }
189     | DB_INSTRUMENT_DIRECTORY_INFO { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_db_instr_dir_info); }
190     | DB_INSTRUMENT_COUNT { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_db_instr_count); }
191     | DB_INSTRUMENT_INFO { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_db_instr_info); }
192 iliev 1200 | DB_INSTRUMENTS_JOB_INFO { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_db_instrs_job_info); }
193 iliev 981 | MISCELLANEOUS { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_misc); }
194     | TOTAL_VOICE_COUNT { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_total_voice_count); }
195 iliev 1108 | GLOBAL_INFO { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_global_info); }
196 senkov 135 ;
197    
198 schoenebeck 1047 map_instruction : MIDI_INSTRUMENT SP modal_arg midi_map SP midi_bank SP midi_prog SP engine_name SP filename SP instrument_index SP volume_value { $$ = LSCPSERVER->AddOrReplaceMIDIInstrumentMapping($4,$6,$8,$10,$12,$14,$16,MidiInstrumentMapper::VOID,"",$3); }
199     | MIDI_INSTRUMENT SP modal_arg midi_map SP midi_bank SP midi_prog SP engine_name SP filename SP instrument_index SP volume_value SP instr_load_mode { $$ = LSCPSERVER->AddOrReplaceMIDIInstrumentMapping($4,$6,$8,$10,$12,$14,$16,$18,"",$3); }
200     | MIDI_INSTRUMENT SP modal_arg midi_map SP midi_bank SP midi_prog SP engine_name SP filename SP instrument_index SP volume_value SP entry_name { $$ = LSCPSERVER->AddOrReplaceMIDIInstrumentMapping($4,$6,$8,$10,$12,$14,$16,MidiInstrumentMapper::VOID,$18,$3); }
201     | MIDI_INSTRUMENT SP modal_arg midi_map SP midi_bank SP midi_prog SP engine_name SP filename SP instrument_index SP volume_value SP instr_load_mode SP entry_name { $$ = LSCPSERVER->AddOrReplaceMIDIInstrumentMapping($4,$6,$8,$10,$12,$14,$16,$18,$20,$3); }
202 schoenebeck 947 ;
203    
204 schoenebeck 973 unmap_instruction : MIDI_INSTRUMENT SP midi_map SP midi_bank SP midi_prog { $$ = LSCPSERVER->RemoveMIDIInstrumentMapping($3,$5,$7); }
205 schoenebeck 947 ;
206    
207 iliev 1161 remove_instruction : CHANNEL SP sampler_channel { $$ = LSCPSERVER->RemoveChannel($3); }
208     | MIDI_INSTRUMENT_MAP SP midi_map { $$ = LSCPSERVER->RemoveMidiInstrumentMap($3); }
209     | MIDI_INSTRUMENT_MAP SP ALL { $$ = LSCPSERVER->RemoveAllMidiInstrumentMaps(); }
210     | DB_INSTRUMENT_DIRECTORY SP FORCE SP pathname { $$ = LSCPSERVER->RemoveDbInstrumentDirectory($5, true); }
211     | DB_INSTRUMENT_DIRECTORY SP pathname { $$ = LSCPSERVER->RemoveDbInstrumentDirectory($3); }
212     | DB_INSTRUMENT SP pathname { $$ = LSCPSERVER->RemoveDbInstrument($3); }
213 schoenebeck 947 ;
214    
215 schoenebeck 219 get_instruction : AVAILABLE_ENGINES { $$ = LSCPSERVER->GetAvailableEngines(); }
216     | AVAILABLE_MIDI_INPUT_DRIVERS { $$ = LSCPSERVER->GetAvailableMidiInputDrivers(); }
217     | MIDI_INPUT_DRIVER SP INFO SP string { $$ = LSCPSERVER->GetMidiInputDriverInfo($5); }
218     | MIDI_INPUT_DRIVER_PARAMETER SP INFO SP string SP string { $$ = LSCPSERVER->GetMidiInputDriverParameterInfo($5, $7); }
219     | MIDI_INPUT_DRIVER_PARAMETER SP INFO SP string SP string SP key_val_list { $$ = LSCPSERVER->GetMidiInputDriverParameterInfo($5, $7, $9); }
220     | AVAILABLE_AUDIO_OUTPUT_DRIVERS { $$ = LSCPSERVER->GetAvailableAudioOutputDrivers(); }
221     | AUDIO_OUTPUT_DRIVER SP INFO SP string { $$ = LSCPSERVER->GetAudioOutputDriverInfo($5); }
222     | AUDIO_OUTPUT_DRIVER_PARAMETER SP INFO SP string SP string { $$ = LSCPSERVER->GetAudioOutputDriverParameterInfo($5, $7); }
223     | AUDIO_OUTPUT_DRIVER_PARAMETER SP INFO SP string SP string SP key_val_list { $$ = LSCPSERVER->GetAudioOutputDriverParameterInfo($5, $7, $9); }
224     | AUDIO_OUTPUT_DEVICES { $$ = LSCPSERVER->GetAudioOutputDeviceCount(); }
225     | MIDI_INPUT_DEVICES { $$ = LSCPSERVER->GetMidiInputDeviceCount(); }
226     | AUDIO_OUTPUT_DEVICE SP INFO SP number { $$ = LSCPSERVER->GetAudioOutputDeviceInfo($5); }
227     | MIDI_INPUT_DEVICE SP INFO SP number { $$ = LSCPSERVER->GetMidiInputDeviceInfo($5); }
228     | MIDI_INPUT_PORT SP INFO SP number SP number { $$ = LSCPSERVER->GetMidiInputPortInfo($5, $7); }
229     | MIDI_INPUT_PORT_PARAMETER SP INFO SP number SP number SP string { $$ = LSCPSERVER->GetMidiInputPortParameterInfo($5, $7, $9); }
230     | AUDIO_OUTPUT_CHANNEL SP INFO SP number SP number { $$ = LSCPSERVER->GetAudioOutputChannelInfo($5, $7); }
231     | AUDIO_OUTPUT_CHANNEL_PARAMETER SP INFO SP number SP number SP string { $$ = LSCPSERVER->GetAudioOutputChannelParameterInfo($5, $7, $9); }
232     | CHANNELS { $$ = LSCPSERVER->GetChannels(); }
233     | CHANNEL SP INFO SP sampler_channel { $$ = LSCPSERVER->GetChannelInfo($5); }
234     | CHANNEL SP BUFFER_FILL SP buffer_size_type SP sampler_channel { $$ = LSCPSERVER->GetBufferFill($5, $7); }
235     | CHANNEL SP STREAM_COUNT SP sampler_channel { $$ = LSCPSERVER->GetStreamCount($5); }
236     | CHANNEL SP VOICE_COUNT SP sampler_channel { $$ = LSCPSERVER->GetVoiceCount($5); }
237     | ENGINE SP INFO SP engine_name { $$ = LSCPSERVER->GetEngineInfo($5); }
238 schoenebeck 563 | SERVER SP INFO { $$ = LSCPSERVER->GetServerInfo(); }
239 iliev 1161 | TOTAL_VOICE_COUNT { $$ = LSCPSERVER->GetTotalVoiceCount(); }
240 iliev 778 | TOTAL_VOICE_COUNT_MAX { $$ = LSCPSERVER->GetTotalVoiceCountMax(); }
241 schoenebeck 973 | MIDI_INSTRUMENTS SP midi_map { $$ = LSCPSERVER->GetMidiInstrumentMappings($3); }
242     | MIDI_INSTRUMENTS SP ALL { $$ = LSCPSERVER->GetAllMidiInstrumentMappings(); }
243     | MIDI_INSTRUMENT SP INFO SP midi_map SP midi_bank SP midi_prog { $$ = LSCPSERVER->GetMidiInstrumentMapping($5,$7,$9); }
244     | MIDI_INSTRUMENT_MAPS { $$ = LSCPSERVER->GetMidiInstrumentMaps(); }
245     | MIDI_INSTRUMENT_MAP SP INFO SP midi_map { $$ = LSCPSERVER->GetMidiInstrumentMap($5); }
246 schoenebeck 1001 | FX_SENDS SP sampler_channel { $$ = LSCPSERVER->GetFxSends($3); }
247     | FX_SEND SP INFO SP sampler_channel SP fx_send_id { $$ = LSCPSERVER->GetFxSendInfo($5,$7); }
248 iliev 1187 | DB_INSTRUMENT_DIRECTORIES SP RECURSIVE SP pathname { $$ = LSCPSERVER->GetDbInstrumentDirectoryCount($5, true); }
249     | DB_INSTRUMENT_DIRECTORIES SP pathname { $$ = LSCPSERVER->GetDbInstrumentDirectoryCount($3, false); }
250 iliev 1161 | DB_INSTRUMENT_DIRECTORY SP INFO SP pathname { $$ = LSCPSERVER->GetDbInstrumentDirectoryInfo($5); }
251 iliev 1187 | DB_INSTRUMENTS SP RECURSIVE SP pathname { $$ = LSCPSERVER->GetDbInstrumentCount($5, true); }
252     | DB_INSTRUMENTS SP pathname { $$ = LSCPSERVER->GetDbInstrumentCount($3, false); }
253 iliev 1161 | DB_INSTRUMENT SP INFO SP pathname { $$ = LSCPSERVER->GetDbInstrumentInfo($5); }
254 iliev 1200 | DB_INSTRUMENTS_JOB SP INFO SP number { $$ = LSCPSERVER->GetDbInstrumentsJobInfo($5); }
255 schoenebeck 1005 | VOLUME { $$ = LSCPSERVER->GetGlobalVolume(); }
256 schoenebeck 35 ;
257    
258 schoenebeck 483 set_instruction : AUDIO_OUTPUT_DEVICE_PARAMETER SP number SP string '=' param_val_list { $$ = LSCPSERVER->SetAudioOutputDeviceParameter($3, $5, $7); }
259     | AUDIO_OUTPUT_CHANNEL_PARAMETER SP number SP number SP string '=' param_val_list { $$ = LSCPSERVER->SetAudioOutputChannelParameter($3, $5, $7, $9); }
260     | MIDI_INPUT_DEVICE_PARAMETER SP number SP string '=' param_val_list { $$ = LSCPSERVER->SetMidiInputDeviceParameter($3, $5, $7); }
261     | MIDI_INPUT_PORT_PARAMETER SP number SP number SP string '=' param_val_list { $$ = LSCPSERVER->SetMidiInputPortParameter($3, $5, $7, $9); }
262     | CHANNEL SP set_chan_instruction { $$ = $3; }
263 schoenebeck 973 | MIDI_INSTRUMENT_MAP SP NAME SP midi_map SP map_name { $$ = LSCPSERVER->SetMidiInstrumentMapName($5, $7); }
264 iliev 1135 | FX_SEND SP NAME SP sampler_channel SP fx_send_id SP fx_send_name { $$ = LSCPSERVER->SetFxSendName($5,$7,$9); }
265 schoenebeck 1001 | FX_SEND SP AUDIO_OUTPUT_CHANNEL SP sampler_channel SP fx_send_id SP audio_channel_index SP audio_channel_index { $$ = LSCPSERVER->SetFxSendAudioOutputChannel($5,$7,$9,$11); }
266 schoenebeck 1026 | FX_SEND SP MIDI_CONTROLLER SP sampler_channel SP fx_send_id SP midi_ctrl { $$ = LSCPSERVER->SetFxSendMidiController($5,$7,$9); }
267     | FX_SEND SP LEVEL SP sampler_channel SP fx_send_id SP volume_value { $$ = LSCPSERVER->SetFxSendLevel($5,$7,$9); }
268 iliev 1161 | DB_INSTRUMENT_DIRECTORY SP NAME SP pathname SP dirname { $$ = LSCPSERVER->SetDbInstrumentDirectoryName($5,$7); }
269     | DB_INSTRUMENT_DIRECTORY SP DESCRIPTION SP pathname SP stringval { $$ = LSCPSERVER->SetDbInstrumentDirectoryDescription($5,$7); }
270     | DB_INSTRUMENT SP NAME SP pathname SP dirname { $$ = LSCPSERVER->SetDbInstrumentName($5,$7); }
271     | DB_INSTRUMENT SP DESCRIPTION SP pathname SP stringval { $$ = LSCPSERVER->SetDbInstrumentDescription($5,$7); }
272 schoenebeck 483 | ECHO SP boolean { $$ = LSCPSERVER->SetEcho((yyparse_param_t*) yyparse_param, $3); }
273 schoenebeck 1005 | VOLUME SP volume_value { $$ = LSCPSERVER->SetGlobalVolume($3); }
274 schoenebeck 123 ;
275    
276 schoenebeck 219 create_instruction : AUDIO_OUTPUT_DEVICE SP string SP key_val_list { $$ = LSCPSERVER->CreateAudioOutputDevice($3,$5); }
277     | AUDIO_OUTPUT_DEVICE SP string { $$ = LSCPSERVER->CreateAudioOutputDevice($3); }
278     | MIDI_INPUT_DEVICE SP string SP key_val_list { $$ = LSCPSERVER->CreateMidiInputDevice($3,$5); }
279     | MIDI_INPUT_DEVICE SP string { $$ = LSCPSERVER->CreateMidiInputDevice($3); }
280 schoenebeck 1001 | FX_SEND SP sampler_channel SP midi_ctrl { $$ = LSCPSERVER->CreateFxSend($3,$5); }
281     | FX_SEND SP sampler_channel SP midi_ctrl SP fx_send_name { $$ = LSCPSERVER->CreateFxSend($3,$5,$7); }
282 schoenebeck 123 ;
283    
284 schoenebeck 947 reset_instruction : CHANNEL SP sampler_channel { $$ = LSCPSERVER->ResetChannel($3); }
285     ;
286    
287 schoenebeck 973 clear_instruction : MIDI_INSTRUMENTS SP midi_map { $$ = LSCPSERVER->ClearMidiInstrumentMappings($3); }
288     | MIDI_INSTRUMENTS SP ALL { $$ = LSCPSERVER->ClearAllMidiInstrumentMappings(); }
289 schoenebeck 947 ;
290    
291 iliev 1187 find_instruction : DB_INSTRUMENTS SP NON_RECURSIVE SP pathname SP query_val_list { $$ = LSCPSERVER->FindDbInstruments($5,$7, false); }
292     | DB_INSTRUMENTS SP pathname SP query_val_list { $$ = LSCPSERVER->FindDbInstruments($3,$5, true); }
293     | DB_INSTRUMENT_DIRECTORIES SP NON_RECURSIVE SP pathname SP query_val_list { $$ = LSCPSERVER->FindDbInstrumentDirectories($5,$7, false); }
294     | DB_INSTRUMENT_DIRECTORIES SP pathname SP query_val_list { $$ = LSCPSERVER->FindDbInstrumentDirectories($3,$5, true); }
295     ;
296    
297 iliev 1161 move_instruction : DB_INSTRUMENT_DIRECTORY SP pathname SP pathname { $$ = LSCPSERVER->MoveDbInstrumentDirectory($3,$5); }
298     | DB_INSTRUMENT SP pathname SP pathname { $$ = LSCPSERVER->MoveDbInstrument($3,$5); }
299     ;
300    
301 iliev 1187 copy_instruction : DB_INSTRUMENT_DIRECTORY SP pathname SP pathname { $$ = LSCPSERVER->CopyDbInstrumentDirectory($3,$5); }
302     | DB_INSTRUMENT SP pathname SP pathname { $$ = LSCPSERVER->CopyDbInstrument($3,$5); }
303     ;
304    
305 schoenebeck 219 destroy_instruction : AUDIO_OUTPUT_DEVICE SP number { $$ = LSCPSERVER->DestroyAudioOutputDevice($3); }
306     | MIDI_INPUT_DEVICE SP number { $$ = LSCPSERVER->DestroyMidiInputDevice($3); }
307 schoenebeck 1001 | FX_SEND SP sampler_channel SP fx_send_id { $$ = LSCPSERVER->DestroyFxSend($3,$5); }
308 schoenebeck 123 ;
309    
310 schoenebeck 35 load_instruction : INSTRUMENT SP load_instr_args { $$ = $3; }
311     | ENGINE SP load_engine_args { $$ = $3; }
312     ;
313    
314 schoenebeck 219 set_chan_instruction : AUDIO_OUTPUT_DEVICE SP sampler_channel SP device_index { $$ = LSCPSERVER->SetAudioOutputDevice($5, $3); }
315     | AUDIO_OUTPUT_CHANNEL SP sampler_channel SP audio_channel_index SP audio_channel_index { $$ = LSCPSERVER->SetAudioOutputChannel($5, $7, $3); }
316     | AUDIO_OUTPUT_TYPE SP sampler_channel SP audio_output_type_name { $$ = LSCPSERVER->SetAudioOutputType($5, $3); }
317     | MIDI_INPUT SP sampler_channel SP device_index SP midi_input_port_index SP midi_input_channel_index { $$ = LSCPSERVER->SetMIDIInput($5, $7, $9, $3); }
318     | MIDI_INPUT_DEVICE SP sampler_channel SP device_index { $$ = LSCPSERVER->SetMIDIInputDevice($5, $3); }
319     | MIDI_INPUT_PORT SP sampler_channel SP midi_input_port_index { $$ = LSCPSERVER->SetMIDIInputPort($5, $3); }
320     | MIDI_INPUT_CHANNEL SP sampler_channel SP midi_input_channel_index { $$ = LSCPSERVER->SetMIDIInputChannel($5, $3); }
321     | MIDI_INPUT_TYPE SP sampler_channel SP midi_input_type_name { $$ = LSCPSERVER->SetMIDIInputType($5, $3); }
322     | VOLUME SP sampler_channel SP volume_value { $$ = LSCPSERVER->SetVolume($5, $3); }
323 schoenebeck 705 | MUTE SP sampler_channel SP boolean { $$ = LSCPSERVER->SetChannelMute($5, $3); }
324     | SOLO SP sampler_channel SP boolean { $$ = LSCPSERVER->SetChannelSolo($5, $3); }
325 schoenebeck 973 | MIDI_INSTRUMENT_MAP SP sampler_channel SP midi_map { $$ = LSCPSERVER->SetChannelMap($3, $5); }
326     | MIDI_INSTRUMENT_MAP SP sampler_channel SP NONE { $$ = LSCPSERVER->SetChannelMap($3, -1); }
327     | MIDI_INSTRUMENT_MAP SP sampler_channel SP DEFAULT { $$ = LSCPSERVER->SetChannelMap($3, -2); }
328 schoenebeck 35 ;
329    
330 schoenebeck 1212 edit_instruction : INSTRUMENT SP sampler_channel { $$ = LSCPSERVER->EditSamplerChannelInstrument($3); }
331     ;
332    
333 schoenebeck 1047 modal_arg : /* epsilon (empty argument) */ { $$ = true; }
334     | NON_MODAL SP { $$ = false; }
335     ;
336    
337 schoenebeck 483 key_val_list : string '=' param_val_list { $$[$1] = $3; }
338     | key_val_list SP string '=' param_val_list { $$ = $1; $$[$3] = $5; }
339 senkov 135 ;
340 schoenebeck 123
341 schoenebeck 35 buffer_size_type : BYTES { $$ = fill_response_bytes; }
342     | PERCENTAGE { $$ = fill_response_percentage; }
343     ;
344    
345 iliev 1187 list_instruction : AUDIO_OUTPUT_DEVICES { $$ = LSCPSERVER->GetAudioOutputDevices(); }
346     | MIDI_INPUT_DEVICES { $$ = LSCPSERVER->GetMidiInputDevices(); }
347     | CHANNELS { $$ = LSCPSERVER->ListChannels(); }
348     | AVAILABLE_ENGINES { $$ = LSCPSERVER->ListAvailableEngines(); }
349     | AVAILABLE_MIDI_INPUT_DRIVERS { $$ = LSCPSERVER->ListAvailableMidiInputDrivers(); }
350     | AVAILABLE_AUDIO_OUTPUT_DRIVERS { $$ = LSCPSERVER->ListAvailableAudioOutputDrivers(); }
351     | MIDI_INSTRUMENTS SP midi_map { $$ = LSCPSERVER->ListMidiInstrumentMappings($3); }
352     | MIDI_INSTRUMENTS SP ALL { $$ = LSCPSERVER->ListAllMidiInstrumentMappings(); }
353     | MIDI_INSTRUMENT_MAPS { $$ = LSCPSERVER->ListMidiInstrumentMaps(); }
354     | FX_SENDS SP sampler_channel { $$ = LSCPSERVER->ListFxSends($3); }
355     | DB_INSTRUMENT_DIRECTORIES SP RECURSIVE SP pathname { $$ = LSCPSERVER->GetDbInstrumentDirectories($5, true); }
356     | DB_INSTRUMENT_DIRECTORIES SP pathname { $$ = LSCPSERVER->GetDbInstrumentDirectories($3); }
357     | DB_INSTRUMENTS SP RECURSIVE SP pathname { $$ = LSCPSERVER->GetDbInstruments($5, true); }
358     | DB_INSTRUMENTS SP pathname { $$ = LSCPSERVER->GetDbInstruments($3); }
359 schoenebeck 123 ;
360    
361 schoenebeck 219 load_instr_args : filename SP instrument_index SP sampler_channel { $$ = LSCPSERVER->LoadInstrument($1, $3, $5); }
362     | NON_MODAL SP filename SP instrument_index SP sampler_channel { $$ = LSCPSERVER->LoadInstrument($3, $5, $7, true); }
363 schoenebeck 35 ;
364    
365 schoenebeck 411 load_engine_args : engine_name SP sampler_channel { $$ = LSCPSERVER->SetEngineType($1, $3); }
366 schoenebeck 35 ;
367    
368 schoenebeck 947 instr_load_mode : ON_DEMAND { $$ = MidiInstrumentMapper::ON_DEMAND; }
369     | ON_DEMAND_HOLD { $$ = MidiInstrumentMapper::ON_DEMAND_HOLD; }
370     | PERSISTENT { $$ = MidiInstrumentMapper::PERSISTENT; }
371     ;
372    
373 schoenebeck 219 device_index : number
374     ;
375    
376     audio_channel_index : number
377     ;
378    
379     audio_output_type_name : string
380     ;
381    
382     midi_input_port_index : number
383     ;
384    
385     midi_input_channel_index : number
386 schoenebeck 274 | ALL { $$ = 16; }
387 schoenebeck 219 ;
388    
389     midi_input_type_name : string
390     ;
391    
392 schoenebeck 973 midi_map : number
393 schoenebeck 947 ;
394    
395 schoenebeck 973 midi_bank : number
396 schoenebeck 947 ;
397    
398     midi_prog : number
399     ;
400    
401 schoenebeck 1001 midi_ctrl : number
402     ;
403    
404 schoenebeck 219 volume_value : dotnum
405     | number { $$ = $1; }
406     ;
407    
408     sampler_channel : number
409     ;
410    
411     instrument_index : number
412     ;
413    
414 schoenebeck 1001 fx_send_id : number
415     ;
416    
417 schoenebeck 219 engine_name : string
418     ;
419    
420 iliev 1161 pathname : stringval
421     ;
422    
423     dirname : stringval
424     ;
425    
426 schoenebeck 219 filename : stringval
427     ;
428    
429 schoenebeck 973 map_name : stringval
430     ;
431    
432 schoenebeck 947 entry_name : stringval
433     ;
434    
435 schoenebeck 1001 fx_send_name : stringval
436     ;
437    
438 schoenebeck 483 param_val_list : param_val
439     | param_val_list','param_val { $$ = $1 + "," + $3; }
440     ;
441    
442 schoenebeck 219 param_val : string
443 schoenebeck 826 | stringval
444 schoenebeck 483 | number { std::stringstream ss; ss << "\'" << $1 << "\'"; $$ = ss.str(); }
445     | dotnum { std::stringstream ss; ss << "\'" << $1 << "\'"; $$ = ss.str(); }
446 schoenebeck 219 ;
447    
448 iliev 1187 query_val_list : string '=' query_val { $$[$1] = $3; }
449     | query_val_list SP string '=' query_val { $$ = $1; $$[$3] = $5; }
450     ;
451    
452     query_val : string
453     | stringval
454     ;
455    
456 iliev 1200 scan_mode : RECURSIVE { $$ = "RECURSIVE"; }
457     | NON_RECURSIVE { $$ = "NON_RECURSIVE"; }
458     | FLAT { $$ = "FLAT"; }
459     ;
460    
461 schoenebeck 573 // GRAMMAR_BNF_END - do NOT delete or modify this line !!!
462 schoenebeck 219
463 schoenebeck 573
464 schoenebeck 219 // atomic variable symbol rules
465    
466     boolean : number { $$ = $1; }
467     | string { $$ = -1; }
468 capela 159 ;
469    
470 schoenebeck 219 string : char { std::string s; s = $1; $$ = s; }
471     | string char { $$ = $1 + $2; }
472 capela 159 ;
473    
474 schoenebeck 225 dotnum : digits '.' digits { $$ = atof(String($1 + "." + $3).c_str()); }
475 schoenebeck 219 | '+' digits '.' digits { String s = "+"; s += $2; s += "."; s += $4; $$ = atof(s.c_str()); }
476     | '-' digits '.' digits { $$ = atof(String("-" + $2 + "." + $4).c_str()); }
477 capela 143 ;
478    
479 schoenebeck 219
480     digits : digit { $$ = $1; }
481     | digits digit { $$ = $1 + $2; }
482 senkov 155 ;
483    
484 schoenebeck 219 digit : '0' { $$ = '0'; }
485     | '1' { $$ = '1'; }
486     | '2' { $$ = '2'; }
487     | '3' { $$ = '3'; }
488     | '4' { $$ = '4'; }
489     | '5' { $$ = '5'; }
490     | '6' { $$ = '6'; }
491     | '7' { $$ = '7'; }
492     | '8' { $$ = '8'; }
493     | '9' { $$ = '9'; }
494 senkov 155 ;
495    
496 schoenebeck 219 number : digit { $$ = atoi(String(1, $1).c_str()); }
497     | '1' digits { $$ = atoi(String(String("1") + $2).c_str()); }
498     | '2' digits { $$ = atoi(String(String("2") + $2).c_str()); }
499     | '3' digits { $$ = atoi(String(String("3") + $2).c_str()); }
500     | '4' digits { $$ = atoi(String(String("4") + $2).c_str()); }
501     | '5' digits { $$ = atoi(String(String("5") + $2).c_str()); }
502     | '6' digits { $$ = atoi(String(String("6") + $2).c_str()); }
503     | '7' digits { $$ = atoi(String(String("7") + $2).c_str()); }
504     | '8' digits { $$ = atoi(String(String("8") + $2).c_str()); }
505     | '9' digits { $$ = atoi(String(String("9") + $2).c_str()); }
506    
507     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'; }
508     | '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'; }
509     | '0' { $$ = '0'; } | '1' { $$ = '1'; } | '2' { $$ = '2'; } | '3' { $$ = '3'; } | '4' { $$ = '4'; } | '5' { $$ = '5'; } | '6' { $$ = '6'; } | '7' { $$ = '7'; } | '8' { $$ = '8'; } | '9' { $$ = '9'; }
510 schoenebeck 226 | '!' { $$ = '!'; } | '#' { $$ = '#'; } | '$' { $$ = '$'; } | '%' { $$ = '%'; } | '&' { $$ = '&'; } | '(' { $$ = '('; } | ')' { $$ = ')'; } | '*' { $$ = '*'; } | '+' { $$ = '+'; } | '-' { $$ = '-'; } | '.' { $$ = '.'; } | ',' { $$ = ','; } | '/' { $$ = '/'; }
511 schoenebeck 219 | ':' { $$ = ':'; } | ';' { $$ = ';'; } | '<' { $$ = '<'; } | '=' { $$ = '='; } | '>' { $$ = '>'; } | '?' { $$ = '?'; } | '@' { $$ = '@'; }
512     | '[' { $$ = '['; } | '\\' { $$ = '\\'; } | ']' { $$ = ']'; } | '^' { $$ = '^'; } | '_' { $$ = '_'; }
513     | '{' { $$ = '{'; } | '|' { $$ = '|'; } | '}' { $$ = '}'; } | '~' { $$ = '~'; }
514     | '\200' { $$ = '\200'; } | '\201' { $$ = '\201'; } | '\202' { $$ = '\202'; }
515     | '\203' { $$ = '\203'; } | '\204' { $$ = '\204'; } | '\205' { $$ = '\205'; }
516     | '\206' { $$ = '\206'; } | '\207' { $$ = '\207'; } | '\210' { $$ = '\210'; }
517     | '\211' { $$ = '\211'; } | '\212' { $$ = '\212'; } | '\213' { $$ = '\213'; }
518     | '\214' { $$ = '\214'; } | '\215' { $$ = '\215'; } | '\216' { $$ = '\216'; }
519     | '\217' { $$ = '\217'; } | '\220' { $$ = '\220'; } | '\221' { $$ = '\221'; }
520     | '\222' { $$ = '\222'; } | '\223' { $$ = '\223'; } | '\224' { $$ = '\224'; }
521     | '\225' { $$ = '\225'; } | '\226' { $$ = '\226'; } | '\227' { $$ = '\227'; }
522     | '\230' { $$ = '\230'; } | '\231' { $$ = '\231'; } | '\232' { $$ = '\232'; }
523     | '\233' { $$ = '\233'; } | '\234' { $$ = '\234'; } | '\235' { $$ = '\235'; }
524     | '\236' { $$ = '\236'; } | '\237' { $$ = '\237'; } | '\240' { $$ = '\240'; }
525     | '\241' { $$ = '\241'; } | '\242' { $$ = '\242'; } | '\243' { $$ = '\243'; }
526     | '\244' { $$ = '\244'; } | '\245' { $$ = '\245'; } | '\246' { $$ = '\246'; }
527     | '\247' { $$ = '\247'; } | '\250' { $$ = '\250'; } | '\251' { $$ = '\251'; }
528     | '\252' { $$ = '\252'; } | '\253' { $$ = '\253'; } | '\254' { $$ = '\254'; }
529     | '\255' { $$ = '\255'; } | '\256' { $$ = '\256'; } | '\257' { $$ = '\257'; }
530     | '\260' { $$ = '\260'; } | '\261' { $$ = '\261'; } | '\262' { $$ = '\262'; }
531     | '\263' { $$ = '\263'; } | '\264' { $$ = '\264'; } | '\265' { $$ = '\265'; }
532     | '\266' { $$ = '\266'; } | '\267' { $$ = '\267'; } | '\270' { $$ = '\270'; }
533     | '\271' { $$ = '\271'; } | '\272' { $$ = '\272'; } | '\273' { $$ = '\273'; }
534     | '\274' { $$ = '\274'; } | '\275' { $$ = '\275'; } | '\276' { $$ = '\276'; }
535     | '\277' { $$ = '\277'; } | '\300' { $$ = '\300'; } | '\301' { $$ = '\301'; }
536     | '\302' { $$ = '\302'; } | '\303' { $$ = '\303'; } | '\304' { $$ = '\304'; }
537     | '\305' { $$ = '\305'; } | '\306' { $$ = '\306'; } | '\307' { $$ = '\307'; }
538     | '\310' { $$ = '\310'; } | '\311' { $$ = '\311'; } | '\312' { $$ = '\312'; }
539     | '\313' { $$ = '\313'; } | '\314' { $$ = '\314'; } | '\315' { $$ = '\315'; }
540     | '\316' { $$ = '\316'; } | '\317' { $$ = '\317'; } | '\320' { $$ = '\320'; }
541     | '\321' { $$ = '\321'; } | '\322' { $$ = '\322'; } | '\323' { $$ = '\323'; }
542     | '\324' { $$ = '\324'; } | '\325' { $$ = '\325'; } | '\326' { $$ = '\326'; }
543     | '\327' { $$ = '\327'; } | '\330' { $$ = '\330'; } | '\331' { $$ = '\331'; }
544     | '\332' { $$ = '\332'; } | '\333' { $$ = '\333'; } | '\334' { $$ = '\334'; }
545     | '\335' { $$ = '\335'; } | '\336' { $$ = '\336'; } | '\337' { $$ = '\337'; }
546     | '\340' { $$ = '\340'; } | '\341' { $$ = '\341'; } | '\342' { $$ = '\342'; }
547     | '\343' { $$ = '\343'; } | '\344' { $$ = '\344'; } | '\345' { $$ = '\345'; }
548     | '\346' { $$ = '\346'; } | '\347' { $$ = '\347'; } | '\350' { $$ = '\350'; }
549     | '\351' { $$ = '\351'; } | '\352' { $$ = '\352'; } | '\353' { $$ = '\353'; }
550     | '\354' { $$ = '\354'; } | '\355' { $$ = '\355'; } | '\356' { $$ = '\356'; }
551     | '\357' { $$ = '\357'; } | '\360' { $$ = '\360'; } | '\361' { $$ = '\361'; }
552     | '\362' { $$ = '\362'; } | '\363' { $$ = '\363'; } | '\364' { $$ = '\364'; }
553     | '\365' { $$ = '\365'; } | '\366' { $$ = '\366'; } | '\367' { $$ = '\367'; }
554     | '\370' { $$ = '\370'; } | '\371' { $$ = '\371'; } | '\372' { $$ = '\372'; }
555     | '\373' { $$ = '\373'; } | '\374' { $$ = '\374'; } | '\375' { $$ = '\375'; }
556     | '\376' { $$ = '\376'; } | '\377' { $$ = '\377'; }
557 senkov 155 ;
558    
559 schoenebeck 221 text : SP { $$ = " "; }
560     | string
561     | text SP { $$ = $1 + " "; }
562     | text string { $$ = $1 + $2; }
563 schoenebeck 35 ;
564    
565 schoenebeck 225 stringval : '\'' text '\'' { $$ = $2; }
566     | '\"' text '\"' { $$ = $2; }
567 schoenebeck 221 ;
568 schoenebeck 219
569 schoenebeck 221
570 schoenebeck 219 // rules which are more or less just terminal symbols
571    
572     SP : ' '
573 schoenebeck 35 ;
574    
575 schoenebeck 219 LF : '\n'
576 schoenebeck 35 ;
577    
578 schoenebeck 219 CR : '\r'
579 schoenebeck 35 ;
580    
581 schoenebeck 219 ADD : 'A''D''D'
582 schoenebeck 35 ;
583    
584 schoenebeck 219 GET : 'G''E''T'
585 schoenebeck 35 ;
586    
587 schoenebeck 947 MAP : 'M''A''P'
588     ;
589    
590     UNMAP : 'U''N''M''A''P'
591     ;
592    
593     CLEAR : 'C''L''E''A''R'
594     ;
595    
596 iliev 1187 FIND : 'F''I''N''D'
597     ;
598    
599 iliev 1161 MOVE : 'M''O''V''E'
600     ;
601    
602 iliev 1187 COPY : 'C''O''P''Y'
603     ;
604    
605 schoenebeck 219 CREATE : 'C''R''E''A''T''E'
606 schoenebeck 35 ;
607    
608 schoenebeck 219 DESTROY : 'D''E''S''T''R''O''Y'
609 schoenebeck 210 ;
610    
611 schoenebeck 219 LIST : 'L''I''S''T'
612 schoenebeck 35 ;
613    
614 schoenebeck 219 LOAD : 'L''O''A''D'
615     ;
616    
617 schoenebeck 228 ALL : 'A''L''L'
618     ;
619    
620 schoenebeck 973 NONE : 'N''O''N''E'
621     ;
622    
623     DEFAULT : 'D''E''F''A''U''L''T'
624     ;
625    
626 schoenebeck 219 NON_MODAL : 'N''O''N''_''M''O''D''A''L'
627     ;
628    
629     REMOVE : 'R''E''M''O''V''E'
630     ;
631    
632     SET : 'S''E''T'
633     ;
634    
635     SUBSCRIBE : 'S''U''B''S''C''R''I''B''E'
636     ;
637    
638     UNSUBSCRIBE : 'U''N''S''U''B''S''C''R''I''B''E'
639     ;
640    
641     CHANNEL : 'C''H''A''N''N''E''L'
642     ;
643    
644     AVAILABLE_ENGINES : 'A''V''A''I''L''A''B''L''E''_''E''N''G''I''N''E''S'
645     ;
646    
647     AVAILABLE_AUDIO_OUTPUT_DRIVERS : 'A''V''A''I''L''A''B''L''E''_''A''U''D''I''O''_''O''U''T''P''U''T''_''D''R''I''V''E''R''S'
648     ;
649    
650     CHANNELS : 'C''H''A''N''N''E''L''S'
651     ;
652    
653     INFO : 'I''N''F''O'
654     ;
655    
656 iliev 981 AUDIO_OUTPUT_DEVICE_COUNT : 'A''U''D''I''O''_''O''U''T''P''U''T''_''D''E''V''I''C''E''_''C''O''U''N''T'
657 iliev 1161 ;
658 iliev 981
659     AUDIO_OUTPUT_DEVICE_INFO : 'A''U''D''I''O''_''O''U''T''P''U''T''_''D''E''V''I''C''E''_''I''N''F''O'
660 iliev 1161 ;
661 iliev 981
662     MIDI_INPUT_DEVICE_COUNT : 'M''I''D''I''_''I''N''P''U''T''_''D''E''V''I''C''E''_''C''O''U''N''T'
663 iliev 1161 ;
664 iliev 981
665     MIDI_INPUT_DEVICE_INFO : 'M''I''D''I''_''I''N''P''U''T''_''D''E''V''I''C''E''_''I''N''F''O'
666 iliev 1161 ;
667 iliev 981
668     MIDI_INSTRUMENT_MAP_COUNT : 'M''I''D''I''_''I''N''S''T''R''U''M''E''N''T''_''M''A''P''_''C''O''U''N''T'
669 iliev 1161 ;
670 iliev 981
671     MIDI_INSTRUMENT_MAP_INFO : 'M''I''D''I''_''I''N''S''T''R''U''M''E''N''T''_''M''A''P''_''I''N''F''O'
672 iliev 1161 ;
673 iliev 981
674     MIDI_INSTRUMENT_COUNT : 'M''I''D''I''_''I''N''S''T''R''U''M''E''N''T''_''C''O''U''N''T'
675 iliev 1161 ;
676 iliev 981
677     MIDI_INSTRUMENT_INFO : 'M''I''D''I''_''I''N''S''T''R''U''M''E''N''T''_''I''N''F''O'
678 iliev 1161 ;
679 iliev 981
680 iliev 1161 DB_INSTRUMENT_DIRECTORY_COUNT : 'D''B''_''I''N''S''T''R''U''M''E''N''T''_''D''I''R''E''C''T''O''R''Y''_''C''O''U''N''T'
681     ;
682    
683     DB_INSTRUMENT_DIRECTORY_INFO : 'D''B''_''I''N''S''T''R''U''M''E''N''T''_''D''I''R''E''C''T''O''R''Y''_''I''N''F''O'
684     ;
685    
686     DB_INSTRUMENT_COUNT : 'D''B''_''I''N''S''T''R''U''M''E''N''T''_''C''O''U''N''T'
687     ;
688    
689     DB_INSTRUMENT_INFO : 'D''B''_''I''N''S''T''R''U''M''E''N''T''_''I''N''F''O'
690     ;
691    
692 iliev 1200 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 schoenebeck 556 CHANNEL_COUNT : 'C''H''A''N''N''E''L''_''C''O''U''N''T'
696     ;
697    
698     CHANNEL_INFO : 'C''H''A''N''N''E''L''_''I''N''F''O'
699     ;
700    
701 iliev 1108 FX_SEND_COUNT : 'F''X''_''S''E''N''D''_''C''O''U''N''T'
702     ;
703    
704     FX_SEND_INFO : 'F''X''_''S''E''N''D''_''I''N''F''O'
705     ;
706    
707 schoenebeck 219 BUFFER_FILL : 'B''U''F''F''E''R''_''F''I''L''L'
708     ;
709    
710     STREAM_COUNT : 'S''T''R''E''A''M''_''C''O''U''N''T'
711     ;
712    
713     VOICE_COUNT : 'V''O''I''C''E''_''C''O''U''N''T'
714     ;
715    
716 iliev 778 TOTAL_VOICE_COUNT : 'T''O''T''A''L''_''V''O''I''C''E''_''C''O''U''N''T'
717     ;
718    
719     TOTAL_VOICE_COUNT_MAX: 'T''O''T''A''L''_''V''O''I''C''E''_''C''O''U''N''T''_''M''A''X'
720     ;
721    
722 iliev 1108 GLOBAL_INFO : 'G''L''O''B''A''L''_''I''N''F''O'
723     ;
724    
725 schoenebeck 219 INSTRUMENT : 'I''N''S''T''R''U''M''E''N''T'
726     ;
727    
728     ENGINE : 'E' 'N' 'G' 'I' 'N' 'E'
729     ;
730    
731 schoenebeck 947 ON_DEMAND : 'O''N''_''D''E''M''A''N''D'
732     ;
733    
734     ON_DEMAND_HOLD : 'O''N''_''D''E''M''A''N''D''_''H''O''L''D'
735     ;
736    
737     PERSISTENT : 'P''E''R''S''I''S''T''E''N''T'
738     ;
739    
740 schoenebeck 219 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'
741     ;
742    
743     AUDIO_OUTPUT_DEVICES : 'A''U''D''I''O''_''O''U''T''P''U''T''_''D''E''V''I''C''E''S'
744     ;
745    
746     AUDIO_OUTPUT_DEVICE : 'A''U''D''I''O''_''O''U''T''P''U''T''_''D''E''V''I''C''E'
747     ;
748    
749     AUDIO_OUTPUT_DRIVER_PARAMETER : 'A''U''D''I''O''_''O''U''T''P''U''T''_''D''R''I''V''E''R''_''P''A''R''A''M''E''T''E''R'
750     ;
751    
752     AUDIO_OUTPUT_DRIVER : 'A''U''D''I''O''_''O''U''T''P''U''T''_''D''R''I''V''E''R'
753     ;
754    
755     AUDIO_OUTPUT_CHANNEL_PARAMETER : 'A''U''D''I''O''_''O''U''T''P''U''T''_''C''H''A''N''N''E''L''_''P''A''R''A''M''E''T''E''R'
756     ;
757    
758     AUDIO_OUTPUT_CHANNEL : 'A''U''D''I''O''_''O''U''T''P''U''T''_''C''H''A''N''N''E''L'
759     ;
760    
761     AUDIO_OUTPUT_TYPE : 'A''U''D''I''O''_''O''U''T''P''U''T''_''T''Y''P''E'
762     ;
763    
764     AVAILABLE_MIDI_INPUT_DRIVERS : 'A''V''A''I''L''A''B''L''E''_''M''I''D''I''_''I''N''P''U''T''_''D''R''I''V''E''R''S'
765     ;
766    
767     MIDI_INPUT_DEVICE_PARAMETER : 'M''I''D''I''_''I''N''P''U''T''_''D''E''V''I''C''E''_''P''A''R''A''M''E''T''E''R'
768     ;
769    
770     MIDI_INPUT_PORT_PARAMETER : 'M''I''D''I''_''I''N''P''U''T''_''P''O''R''T''_''P''A''R''A''M''E''T''E''R'
771     ;
772    
773     MIDI_INPUT_DEVICES : 'M''I''D''I''_''I''N''P''U''T''_''D''E''V''I''C''E''S'
774     ;
775    
776     MIDI_INPUT_DEVICE : 'M''I''D''I''_''I''N''P''U''T''_''D''E''V''I''C''E'
777     ;
778    
779     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'
780     ;
781    
782 schoenebeck 947 MIDI_INSTRUMENT : 'M''I''D''I''_''I''N''S''T''R''U''M''E''N''T'
783     ;
784    
785     MIDI_INSTRUMENTS : 'M''I''D''I''_''I''N''S''T''R''U''M''E''N''T''S'
786     ;
787    
788 schoenebeck 973 MIDI_INSTRUMENT_MAP : 'M''I''D''I''_''I''N''S''T''R''U''M''E''N''T''_''M''A''P'
789     ;
790    
791     MIDI_INSTRUMENT_MAPS : 'M''I''D''I''_''I''N''S''T''R''U''M''E''N''T''_''M''A''P''S'
792     ;
793    
794 schoenebeck 219 MIDI_INPUT_DRIVER : 'M''I''D''I''_''I''N''P''U''T''_''D''R''I''V''E''R'
795     ;
796    
797     MIDI_INPUT_PORT : 'M''I''D''I''_''I''N''P''U''T''_''P''O''R''T'
798     ;
799    
800     MIDI_INPUT_CHANNEL : 'M''I''D''I''_''I''N''P''U''T''_''C''H''A''N''N''E''L'
801     ;
802    
803     MIDI_INPUT_TYPE : 'M''I''D''I''_''I''N''P''U''T''_''T''Y''P''E'
804     ;
805    
806     MIDI_INPUT : 'M''I''D''I''_''I''N''P''U''T'
807     ;
808    
809 schoenebeck 1026 MIDI_CONTROLLER : 'M''I''D''I''_''C''O''N''T''R''O''L''L''E''R'
810     ;
811    
812 schoenebeck 1001 FX_SEND : 'F''X''_''S''E''N''D'
813     ;
814    
815     FX_SENDS : 'F''X''_''S''E''N''D''S'
816     ;
817    
818 iliev 1161 DB_INSTRUMENT_DIRECTORY : 'D''B''_''I''N''S''T''R''U''M''E''N''T''_''D''I''R''E''C''T''O''R''Y'
819     ;
820    
821     DB_INSTRUMENT_DIRECTORIES : 'D''B''_''I''N''S''T''R''U''M''E''N''T''_''D''I''R''E''C''T''O''R''I''E''S'
822     ;
823    
824     DB_INSTRUMENTS : 'D''B''_''I''N''S''T''R''U''M''E''N''T''S'
825     ;
826    
827     DB_INSTRUMENT : 'D''B''_''I''N''S''T''R''U''M''E''N''T'
828     ;
829    
830 iliev 1200 DB_INSTRUMENTS_JOB : 'D''B''_''I''N''S''T''R''U''M''E''N''T''S''_''J''O''B'
831     ;
832    
833 iliev 1161 DESCRIPTION : 'D''E''S''C''R''I''P''T''I''O''N'
834     ;
835    
836     FORCE : 'F''O''R''C''E'
837     ;
838    
839     FLAT : 'F''L''A''T'
840     ;
841    
842 iliev 1187 RECURSIVE : 'R''E''C''U''R''S''I''V''E'
843     ;
844    
845 iliev 1161 NON_RECURSIVE : 'N''O''N''_''R''E''C''U''R''S''I''V''E'
846     ;
847    
848 schoenebeck 563 SERVER : 'S''E''R''V''E''R'
849     ;
850    
851 schoenebeck 219 VOLUME : 'V''O''L''U''M''E'
852     ;
853    
854 schoenebeck 1026 LEVEL : 'L''E''V''E''L'
855     ;
856    
857 schoenebeck 705 MUTE : 'M''U''T''E'
858     ;
859    
860     SOLO : 'S''O''L''O'
861     ;
862    
863 schoenebeck 219 BYTES : 'B''Y''T''E''S'
864     ;
865    
866     PERCENTAGE : 'P''E''R''C''E''N''T''A''G''E'
867     ;
868    
869 schoenebeck 1212 EDIT : 'E''D''I''T'
870     ;
871    
872 schoenebeck 219 RESET : 'R''E''S''E''T'
873     ;
874    
875     MISCELLANEOUS : 'M''I''S''C''E''L''L''A''N''E''O''U''S'
876     ;
877    
878 schoenebeck 973 NAME : 'N''A''M''E'
879     ;
880    
881 schoenebeck 219 ECHO : 'E''C''H''O'
882     ;
883    
884     QUIT : 'Q''U''I''T'
885     ;
886    
887 schoenebeck 35 %%
888    
889     /**
890     * Will be called when an error occured (usually syntax error).
891     */
892     void yyerror(const char* s) {
893     dmsg(2,("LSCPParser: %s\n", s));
894     }
895    
896     /**
897 schoenebeck 219 * Clears input buffer.
898 schoenebeck 35 */
899     void restart(yyparse_param_t* pparam, int& yychar) {
900 schoenebeck 219 bytes = 0;
901     ptr = 0;
902 schoenebeck 35 }

  ViewVC Help
Powered by ViewVC