--- linuxsampler/trunk/src/network/lscp.y 2007/09/15 11:05:38 1349 +++ linuxsampler/trunk/src/network/lscp.y 2008/12/14 15:43:18 1808 @@ -3,7 +3,7 @@ * LinuxSampler - modular, streaming capable sampler * * * * Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * - * Copyright (C) 2005 - 2007 Christian Schoenebeck * + * Copyright (C) 2005 - 2008 Christian Schoenebeck * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -34,6 +34,9 @@ #include "lscpparser.h" #include "lscpserver.h" #include "lscpevent.h" +#include "lscpsymbols.h" + +namespace LinuxSampler { // to save us typing work in the rules action definitions #define LSCPSERVER ((yyparse_param_t*) yyparse_param)->pServer @@ -44,9 +47,6 @@ void restart(yyparse_param_t* pparam, int& yychar); #define RESTART restart((yyparse_param_t*) YYPARSE_PARAM, yychar) -// we provide our own version of yyerror() so we don't have to link against the yacc library -void yyerror(const char* s); - static char buf[1024]; // input buffer to feed the parser with new characters static int bytes = 0; // current number of characters in the input buffer static int ptr = 0; // current position in the input buffer @@ -101,32 +101,12 @@ return atoi(d2)*8*8 + atoi(d1)*8 + atoi(d0); } -int hexToNumber(char hex_digit) { - switch (hex_digit) { - case '0': return 0; - case '1': return 1; - case '2': return 2; - case '3': return 3; - case '4': return 4; - case '5': return 5; - case '6': return 6; - case '7': return 7; - case '8': return 8; - case '9': return 9; - // grammar rule 'digit_hex' already forced lower case - case 'a': return 10; - case 'b': return 11; - case 'c': return 12; - case 'd': return 13; - case 'e': return 14; - case 'f': return 15; - default: return 0; - } } -int hexsToNumber(char hex_digit0, char hex_digit1 = '0') { - return hexToNumber(hex_digit1)*16 + hexToNumber(hex_digit0); -} +// we provide our own version of yyerror() so we don't have to link against the yacc library +void yyerror(const char* s); + +using namespace LinuxSampler; %} @@ -138,15 +118,15 @@ %token EXT_ASCII_CHAR -%type char char_base digit digit_oct digit_hex escape_seq escape_seq_octal escape_seq_hex +%type char char_base alpha_char digit digit_oct digit_hex escape_seq escape_seq_octal escape_seq_hex %type dotnum volume_value boolean %type number sampler_channel instrument_index fx_send_id audio_channel_index device_index midi_input_channel_index midi_input_port_index midi_map midi_bank midi_prog midi_ctrl -%type string string_escaped text text_escaped textval_escaped stringval stringval_escaped digits param_val_list param_val query_val filename db_path 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 +%type string string_escaped text text_escaped text_escaped_base stringval stringval_escaped digits param_val_list param_val query_val filename db_path map_name entry_name fx_send_name engine_name command add_instruction create_instruction destroy_instruction get_instruction list_instruction load_instruction send_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 format_instruction %type buffer_size_type %type key_val_list query_val_list %type instr_load_mode %type modal_arg -%type path path_base +%type path path_base path_prefix path_body %start input @@ -198,18 +178,22 @@ | MOVE SP move_instruction { $$ = $3; } | COPY SP copy_instruction { $$ = $3; } | EDIT SP edit_instruction { $$ = $3; } + | FORMAT SP format_instruction { $$ = $3; } + | SEND SP send_instruction { $$ = $3; } | RESET { $$ = LSCPSERVER->ResetSampler(); } | QUIT { LSCPSERVER->AnswerClient("Bye!\r\n"); return LSCP_QUIT; } ; add_instruction : CHANNEL { $$ = LSCPSERVER->AddChannel(); } | DB_INSTRUMENT_DIRECTORY SP db_path { $$ = LSCPSERVER->AddDbInstrumentDirectory($3); } - | DB_INSTRUMENTS SP NON_MODAL SP scan_mode SP db_path SP filename { $$ = LSCPSERVER->AddDbInstruments($5,$7,$9, true); } - | DB_INSTRUMENTS SP scan_mode SP db_path SP filename { $$ = LSCPSERVER->AddDbInstruments($3,$5,$7); } - | DB_INSTRUMENTS SP NON_MODAL SP db_path SP filename { $$ = LSCPSERVER->AddDbInstruments($5,$7, -1, true); } - | DB_INSTRUMENTS SP NON_MODAL SP db_path SP filename SP instrument_index { $$ = LSCPSERVER->AddDbInstruments($5,$7,$9, true); } - | DB_INSTRUMENTS SP db_path SP filename { $$ = LSCPSERVER->AddDbInstruments($3,$5); } - | DB_INSTRUMENTS SP db_path SP filename SP instrument_index { $$ = LSCPSERVER->AddDbInstruments($3,$5,$7); } + | DB_INSTRUMENTS SP NON_MODAL SP scan_mode SP db_path SP filename { $$ = LSCPSERVER->AddDbInstruments($5,$7,$9, true); } + | DB_INSTRUMENTS SP NON_MODAL SP scan_mode SP FILE_AS_DIR SP db_path SP filename { $$ = LSCPSERVER->AddDbInstruments($5,$9,$11, true, true); } + | DB_INSTRUMENTS SP scan_mode SP db_path SP filename { $$ = LSCPSERVER->AddDbInstruments($3,$5,$7); } + | DB_INSTRUMENTS SP scan_mode SP FILE_AS_DIR SP db_path SP filename { $$ = LSCPSERVER->AddDbInstruments($3,$7,$9, false, true); } + | DB_INSTRUMENTS SP NON_MODAL SP db_path SP filename { $$ = LSCPSERVER->AddDbInstruments($5,$7, -1, true); } + | DB_INSTRUMENTS SP NON_MODAL SP db_path SP filename SP instrument_index { $$ = LSCPSERVER->AddDbInstruments($5,$7,$9, true); } + | DB_INSTRUMENTS SP db_path SP filename { $$ = LSCPSERVER->AddDbInstruments($3,$5); } + | DB_INSTRUMENTS SP db_path SP filename SP instrument_index { $$ = LSCPSERVER->AddDbInstruments($3,$5,$7); } | MIDI_INSTRUMENT_MAP { $$ = LSCPSERVER->AddMidiInstrumentMap(); } | MIDI_INSTRUMENT_MAP SP map_name { $$ = LSCPSERVER->AddMidiInstrumentMap($3); } ; @@ -219,6 +203,8 @@ | MIDI_INPUT_DEVICE_COUNT { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_midi_device_count); } | MIDI_INPUT_DEVICE_INFO { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_midi_device_info); } | CHANNEL_COUNT { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_channel_count); } + | CHANNEL_MIDI { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_channel_midi); } + | DEVICE_MIDI { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_device_midi); } | VOICE_COUNT { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_voice_count); } | STREAM_COUNT { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_stream_count); } | BUFFER_FILL { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_buffer_fill); } @@ -235,6 +221,7 @@ | DB_INSTRUMENT_INFO { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_db_instr_info); } | DB_INSTRUMENTS_JOB_INFO { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_db_instrs_job_info); } | MISCELLANEOUS { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_misc); } + | TOTAL_STREAM_COUNT { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_total_stream_count); } | TOTAL_VOICE_COUNT { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_total_voice_count); } | GLOBAL_INFO { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_global_info); } ; @@ -244,6 +231,8 @@ | MIDI_INPUT_DEVICE_COUNT { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_midi_device_count); } | MIDI_INPUT_DEVICE_INFO { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_midi_device_info); } | CHANNEL_COUNT { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_channel_count); } + | CHANNEL_MIDI { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_channel_midi); } + | DEVICE_MIDI { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_device_midi); } | VOICE_COUNT { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_voice_count); } | STREAM_COUNT { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_stream_count); } | BUFFER_FILL { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_buffer_fill); } @@ -260,13 +249,14 @@ | DB_INSTRUMENT_INFO { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_db_instr_info); } | DB_INSTRUMENTS_JOB_INFO { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_db_instrs_job_info); } | MISCELLANEOUS { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_misc); } + | TOTAL_STREAM_COUNT { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_total_stream_count); } | TOTAL_VOICE_COUNT { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_total_voice_count); } | GLOBAL_INFO { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_global_info); } ; -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); } +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::DONTCARE,"",$3); } | 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); } - | 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); } + | 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::DONTCARE,$18,$3); } | 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); } ; @@ -305,6 +295,7 @@ | CHANNEL SP VOICE_COUNT SP sampler_channel { $$ = LSCPSERVER->GetVoiceCount($5); } | ENGINE SP INFO SP engine_name { $$ = LSCPSERVER->GetEngineInfo($5); } | SERVER SP INFO { $$ = LSCPSERVER->GetServerInfo(); } + | TOTAL_STREAM_COUNT { $$ = LSCPSERVER->GetTotalStreamCount(); } | TOTAL_VOICE_COUNT { $$ = LSCPSERVER->GetTotalVoiceCount(); } | TOTAL_VOICE_COUNT_MAX { $$ = LSCPSERVER->GetTotalVoiceCountMax(); } | MIDI_INSTRUMENTS SP midi_map { $$ = LSCPSERVER->GetMidiInstrumentMappings($3); } @@ -322,6 +313,10 @@ | DB_INSTRUMENT SP INFO SP db_path { $$ = LSCPSERVER->GetDbInstrumentInfo($5); } | DB_INSTRUMENTS_JOB SP INFO SP number { $$ = LSCPSERVER->GetDbInstrumentsJobInfo($5); } | VOLUME { $$ = LSCPSERVER->GetGlobalVolume(); } + | VOICES { $$ = LSCPSERVER->GetGlobalMaxVoices(); } + | STREAMS { $$ = LSCPSERVER->GetGlobalMaxStreams(); } + | FILE SP INSTRUMENTS SP filename { $$ = LSCPSERVER->GetFileInstruments($5); } + | FILE SP INSTRUMENT SP INFO SP filename SP instrument_index { $$ = LSCPSERVER->GetFileInstrumentInfo($7,$9); } ; set_instruction : AUDIO_OUTPUT_DEVICE_PARAMETER SP number SP string '=' param_val_list { $$ = LSCPSERVER->SetAudioOutputDeviceParameter($3, $5, $7); } @@ -339,8 +334,11 @@ | DB_INSTRUMENT_DIRECTORY SP DESCRIPTION SP db_path SP stringval_escaped { $$ = LSCPSERVER->SetDbInstrumentDirectoryDescription($5,$7); } | DB_INSTRUMENT SP NAME SP db_path SP stringval_escaped { $$ = LSCPSERVER->SetDbInstrumentName($5,$7); } | DB_INSTRUMENT SP DESCRIPTION SP db_path SP stringval_escaped { $$ = LSCPSERVER->SetDbInstrumentDescription($5,$7); } + | DB_INSTRUMENT SP FILE_PATH SP filename SP filename { $$ = LSCPSERVER->SetDbInstrumentFilePath($5,$7); } | ECHO SP boolean { $$ = LSCPSERVER->SetEcho((yyparse_param_t*) yyparse_param, $3); } | VOLUME SP volume_value { $$ = LSCPSERVER->SetGlobalVolume($3); } + | VOICES SP number { $$ = LSCPSERVER->SetGlobalMaxVoices($3); } + | STREAMS SP number { $$ = LSCPSERVER->SetGlobalMaxStreams($3); } ; create_instruction : AUDIO_OUTPUT_DEVICE SP string SP key_val_list { $$ = LSCPSERVER->CreateAudioOutputDevice($3,$5); } @@ -362,6 +360,7 @@ | DB_INSTRUMENTS SP db_path SP query_val_list { $$ = LSCPSERVER->FindDbInstruments($3,$5, true); } | DB_INSTRUMENT_DIRECTORIES SP NON_RECURSIVE SP db_path SP query_val_list { $$ = LSCPSERVER->FindDbInstrumentDirectories($5,$7, false); } | DB_INSTRUMENT_DIRECTORIES SP db_path SP query_val_list { $$ = LSCPSERVER->FindDbInstrumentDirectories($3,$5, true); } + | LOST SP DB_INSTRUMENT_FILES { $$ = LSCPSERVER->FindLostDbInstrumentFiles(); } ; move_instruction : DB_INSTRUMENT_DIRECTORY SP db_path SP db_path { $$ = LSCPSERVER->MoveDbInstrumentDirectory($3,$5); } @@ -397,7 +396,10 @@ | MIDI_INSTRUMENT_MAP SP sampler_channel SP DEFAULT { $$ = LSCPSERVER->SetChannelMap($3, -2); } ; -edit_instruction : INSTRUMENT SP sampler_channel { $$ = LSCPSERVER->EditSamplerChannelInstrument($3); } +edit_instruction : CHANNEL SP INSTRUMENT SP sampler_channel { $$ = LSCPSERVER->EditSamplerChannelInstrument($5); } + ; + +format_instruction : INSTRUMENTS_DB { $$ = LSCPSERVER->FormatInstrumentsDb(); } ; modal_arg : /* epsilon (empty argument) */ { $$ = true; } @@ -426,6 +428,10 @@ | DB_INSTRUMENT_DIRECTORIES SP db_path { $$ = LSCPSERVER->GetDbInstrumentDirectories($3); } | DB_INSTRUMENTS SP RECURSIVE SP db_path { $$ = LSCPSERVER->GetDbInstruments($5, true); } | DB_INSTRUMENTS SP db_path { $$ = LSCPSERVER->GetDbInstruments($3); } + | FILE SP INSTRUMENTS SP filename { $$ = LSCPSERVER->ListFileInstruments($5); } + ; + +send_instruction : CHANNEL SP MIDI_DATA SP string SP sampler_channel SP number SP number { $$ = LSCPSERVER->SendChannelMidiData($5, $7, $9, $11); } ; load_instr_args : filename SP instrument_index SP sampler_channel { $$ = LSCPSERVER->LoadInstrument($1, $3, $5); } @@ -487,27 +493,35 @@ engine_name : string ; -filename : path { $$ = $1.toPosix(); /*TODO: assuming POSIX*/ } +filename : path { + #if WIN32 + $$ = $1.toWindows(); + #else + // assuming POSIX + $$ = $1.toPosix(); + #endif + } ; db_path : path { $$ = $1.toDbPath(); } ; -map_name : stringval +map_name : stringval_escaped ; -entry_name : stringval +entry_name : stringval_escaped ; -fx_send_name : stringval +fx_send_name : stringval_escaped ; param_val_list : param_val | param_val_list','param_val { $$ = $1 + "," + $3; } ; -param_val : string - | stringval +//TODO: the re-encapsulation into apostrophes for string and strinval here is a hack, since we need a way for __parse_strings() (DeviceParameters.cpp) to distinguish a comma separated list of strings and a string which contains commas. A clean solution would be to move those parser jobs over here to lscp.y +param_val : string { $$ = "\'" + $1 + "\'"; } + | stringval { $$ = "\'" + $1 + "\'"; } | number { std::stringstream ss; ss << "\'" << $1 << "\'"; $$ = ss.str(); } | dotnum { std::stringstream ss; ss << "\'" << $1 << "\'"; $$ = ss.str(); } ; @@ -516,7 +530,7 @@ | query_val_list SP string '=' query_val { $$ = $1; $$[$3] = $5; } ; -query_val : textval_escaped +query_val : text_escaped | stringval_escaped ; @@ -606,17 +620,24 @@ | '\"' path_base '\"' { $$ = $2; } ; -path_base : '/' { $$ = Path(); } - | path_base '/' { $$ = $1; } - | path_base text_escaped { Path p; p.appendNode($2); $$ = $1 + p; } +path_base : path_prefix path_body { $$ = $1 + $2; } + ; + +path_prefix : '/' { $$ = Path(); } + | alpha_char ':' '/' { Path p; p.setDrive($1); $$ = p; } + ; + +path_body : /* epsilon (empty argument) */ { $$ = Path(); } + | path_body '/' { $$ = $1; } + | path_body text_escaped_base { Path p; p.appendNode($2); $$ = $1 + p; } ; stringval : '\'' text '\'' { $$ = $2; } | '\"' text '\"' { $$ = $2; } ; -stringval_escaped : '\'' textval_escaped '\'' { $$ = $2; } - | '\"' textval_escaped '\"' { $$ = $2; } +stringval_escaped : '\'' text_escaped '\'' { $$ = $2; } + | '\"' text_escaped '\"' { $$ = $2; } ; text : SP { $$ = " "; } @@ -625,16 +646,17 @@ | text string { $$ = $1 + $2; } ; -text_escaped : SP { $$ = " "; } +// like text_escaped, but missing the slash ('/') character +text_escaped_base : SP { $$ = " "; } | string_escaped - | text_escaped SP { $$ = $1 + " "; } - | text_escaped string_escaped { $$ = $1 + $2; } + | text_escaped_base SP { $$ = $1 + " "; } + | text_escaped_base string_escaped { $$ = $1 + $2; } ; -textval_escaped : '/' { $$ = "/"; } - | text_escaped - | textval_escaped '/' { $$ = $1 + "/"; } - | textval_escaped text_escaped { $$ = $1 + $2; } +text_escaped : '/' { $$ = "/"; } + | text_escaped_base + | text_escaped '/' { $$ = $1 + "/"; } + | text_escaped text_escaped_base { $$ = $1 + $2; } ; string : char { std::string s; s = $1; $$ = s; } @@ -653,9 +675,13 @@ | '/' { $$ = '/'; } ; -// ASCII characters except space, quotation mark, apostrophe, backslash and slash -char_base : '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'; } +// characters A..Z and a..z +alpha_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'; } | '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'; } + ; + +// ASCII characters except space, quotation mark, apostrophe, backslash and slash +char_base : alpha_char | '0' { $$ = '0'; } | '1' { $$ = '1'; } | '2' { $$ = '2'; } | '3' { $$ = '3'; } | '4' { $$ = '4'; } | '5' { $$ = '5'; } | '6' { $$ = '6'; } | '7' { $$ = '7'; } | '8' { $$ = '8'; } | '9' { $$ = '9'; } | '!' { $$ = '!'; } | '#' { $$ = '#'; } | '$' { $$ = '$'; } | '%' { $$ = '%'; } | '&' { $$ = '&'; } | '(' { $$ = '('; } | ')' { $$ = ')'; } | '*' { $$ = '*'; } | '+' { $$ = '+'; } | '-' { $$ = '-'; } | '.' { $$ = '.'; } | ',' { $$ = ','; } | ':' { $$ = ':'; } | ';' { $$ = ';'; } | '<' { $$ = '<'; } | '=' { $$ = '='; } | '>' { $$ = '>'; } | '?' { $$ = '?'; } | '@' { $$ = '@'; } @@ -715,6 +741,9 @@ FIND : 'F''I''N''D' ; +FILE_AS_DIR : 'F''I''L''E''_''A''S''_''D''I''R' + ; + MOVE : 'M''O''V''E' ; @@ -808,12 +837,21 @@ DB_INSTRUMENT_INFO : 'D''B''_''I''N''S''T''R''U''M''E''N''T''_''I''N''F''O' ; +DB_INSTRUMENT_FILES : 'D''B''_''I''N''S''T''R''U''M''E''N''T''_''F''I''L''E''S' + ; + DB_INSTRUMENTS_JOB_INFO : 'D''B''_''I''N''S''T''R''U''M''E''N''T''S''_''J''O''B''_''I''N''F''O' ; CHANNEL_COUNT : 'C''H''A''N''N''E''L''_''C''O''U''N''T' ; +CHANNEL_MIDI : 'C''H''A''N''N''E''L''_''M''I''D''I' + ; + +DEVICE_MIDI : 'D''E''V''I''C''E''_''M''I''D''I' + ; + CHANNEL_INFO : 'C''H''A''N''N''E''L''_''I''N''F''O' ; @@ -832,6 +870,9 @@ VOICE_COUNT : 'V''O''I''C''E''_''C''O''U''N''T' ; +TOTAL_STREAM_COUNT : 'T''O''T''A''L''_''S''T''R''E''A''M''_''C''O''U''N''T' + ; + TOTAL_VOICE_COUNT : 'T''O''T''A''L''_''V''O''I''C''E''_''C''O''U''N''T' ; @@ -844,6 +885,9 @@ INSTRUMENT : 'I''N''S''T''R''U''M''E''N''T' ; +INSTRUMENTS : 'I''N''S''T''R''U''M''E''N''T''S' + ; + ENGINE : 'E' 'N' 'G' 'I' 'N' 'E' ; @@ -928,6 +972,9 @@ MIDI_CONTROLLER : 'M''I''D''I''_''C''O''N''T''R''O''L''L''E''R' ; +SEND : 'S''E''N''D' + ; + FX_SEND : 'F''X''_''S''E''N''D' ; @@ -949,6 +996,9 @@ DB_INSTRUMENTS_JOB : 'D''B''_''I''N''S''T''R''U''M''E''N''T''S''_''J''O''B' ; +INSTRUMENTS_DB : 'I''N''S''T''R''U''M''E''N''T''S''_''D''B' + ; + DESCRIPTION : 'D''E''S''C''R''I''P''T''I''O''N' ; @@ -964,6 +1014,12 @@ NON_RECURSIVE : 'N''O''N''_''R''E''C''U''R''S''I''V''E' ; +LOST : 'L''O''S''T' + ; + +FILE_PATH : 'F''I''L''E''_''P''A''T''H' + ; + SERVER : 'S''E''R''V''E''R' ; @@ -979,15 +1035,30 @@ SOLO : 'S''O''L''O' ; +VOICES : 'V''O''I''C''E''S' + ; + +STREAMS : 'S''T''R''E''A''M''S' + ; + BYTES : 'B''Y''T''E''S' ; PERCENTAGE : 'P''E''R''C''E''N''T''A''G''E' ; +FILE : 'F''I''L''E' + ; + EDIT : 'E''D''I''T' ; +FORMAT : 'F''O''R''M''A''T' + ; + +MIDI_DATA : 'M''I''D''I''_''D''A''T''A' + ; + RESET : 'R''E''S''E''T' ; @@ -1018,6 +1089,8 @@ sLastError = msg; } +namespace LinuxSampler { + /** * Clears input buffer. */ @@ -1026,3 +1099,5 @@ ptr = 0; sLastError = ""; } + +}