/[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 209 by schoenebeck, Sun Jul 18 00:29:39 2004 UTC revision 210 by schoenebeck, Sat Jul 24 12:33:49 2004 UTC
# Line 20  Line 20 
20   *   MA  02111-1307  USA                                                   *   *   MA  02111-1307  USA                                                   *
21   ***************************************************************************/   ***************************************************************************/
22    
23    /* Note: don't forget to run 'make parser' after you changed this file, */
24    /*       otherwise the parser will not be regenerated!                  */
25    
26  %{  %{
27    
28  #include "lscpparser.h"  #include "lscpparser.h"
# Line 55  void yyerror(const char* s); Line 58  void yyerror(const char* s);
58  %token <Number> NUMBER  %token <Number> NUMBER
59  %token <String> STRINGVAL  %token <String> STRINGVAL
60  %token SP LF CR HASH EQ  %token SP LF CR HASH EQ
61  %token ADD GET CREATE DESTROY LIST LOAD NON_MODAL REMOVE SET SUBSCRIBE UNSUBSCRIBE RESET QUIT  %token ADD GET CREATE DESTROY LIST LOAD NON_MODAL REMOVE SET SUBSCRIBE UNSUBSCRIBE RESET ECHO QUIT
62  %token CHANNEL NOTIFICATION  %token CHANNEL NOTIFICATION
63  %token AVAILABLE_ENGINES AVAILABLE_AUDIO_OUTPUT_DRIVERS CHANNELS INFO BUFFER_FILL STREAM_COUNT VOICE_COUNT  %token AVAILABLE_ENGINES AVAILABLE_AUDIO_OUTPUT_DRIVERS CHANNELS INFO BUFFER_FILL STREAM_COUNT VOICE_COUNT
64  %token INSTRUMENT ENGINE  %token INSTRUMENT ENGINE
# Line 64  void yyerror(const char* s); Line 67  void yyerror(const char* s);
67  %token BYTES PERCENTAGE  %token BYTES PERCENTAGE
68  %token MISCELLANEOUS  %token MISCELLANEOUS
69    
70  %type <Dotnum> volume  %type <Dotnum> volume boolean
71  %type <Number> sampler_channel instrument_index audio_output_channel audio_output_device midi_input_channel midi_input_port midi_input_device  %type <Number> sampler_channel instrument_index audio_output_channel audio_output_device midi_input_channel midi_input_port midi_input_device
72  %type <String> string 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 midi_input_type set_instruction subscribe_event unsubscribe_event  %type <String> string 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 midi_input_type set_instruction subscribe_event unsubscribe_event
73  %type <FillResponse> buffer_size_type  %type <FillResponse> buffer_size_type
# Line 151  set_instruction       :  AUDIO_OUTPUT_DE Line 154  set_instruction       :  AUDIO_OUTPUT_DE
154                        |  MIDI_INPUT_DEVICE_PARAMETER SP NUMBER SP string EQ param_val               { $$ = LSCPSERVER->SetMidiInputDeviceParameter($3, $5, $7);       }                        |  MIDI_INPUT_DEVICE_PARAMETER SP NUMBER SP string EQ param_val               { $$ = LSCPSERVER->SetMidiInputDeviceParameter($3, $5, $7);       }
155                        |  MIDI_INPUT_PORT_PARAMETER SP NUMBER SP NUMBER SP string EQ param_val       { $$ = LSCPSERVER->SetMidiInputPortParameter($3, $5, $7, $9);       }                        |  MIDI_INPUT_PORT_PARAMETER SP NUMBER SP NUMBER SP string EQ param_val       { $$ = LSCPSERVER->SetMidiInputPortParameter($3, $5, $7, $9);       }
156                        |  CHANNEL SP set_chan_instruction                                            { $$ = $3;                                                         }                        |  CHANNEL SP set_chan_instruction                                            { $$ = $3;                                                         }
157                          |  ECHO SP boolean                                                            { $$ = LSCPSERVER->SetEcho((yyparse_param_t*) yyparse_param, $3);  }
158                        ;                        ;
159    
160  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 240  param_val             :  STRINGVAL Line 244  param_val             :  STRINGVAL
244                        |  DOTNUM                   { std::stringstream ss; ss << $1; $$ = ss.str();       }                        |  DOTNUM                   { std::stringstream ss; ss << $1; $$ = ss.str();       }
245                        ;                        ;
246    
247    boolean               :  NUMBER  { $$ = $1; }
248                          |  string  { $$ = -1; }
249                          ;
250    
251  string                :  CHAR          { std::string s; s = $1; $$ = s; }  string                :  CHAR          { std::string s; s = $1; $$ = s; }
252                        |  string CHAR   { $$ = $1 + $2;                  }                        |  string CHAR   { $$ = $1 + $2;                  }
253                        ;                        ;

Legend:
Removed from v.209  
changed lines
  Added in v.210

  ViewVC Help
Powered by ViewVC