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" |
29 |
#include "lscpserver.h" |
#include "lscpserver.h" |
30 |
|
#include "lscpevent.h" |
31 |
|
|
32 |
// as we need an reentrant scanner, we have to pass the pointer to the scanner with each yylex() call |
// as we need an reentrant scanner, we have to pass the pointer to the scanner with each yylex() call |
33 |
#define YYLEX_PARAM ((yyparse_param_t*) yyparse_param)->pScanner |
#define YYLEX_PARAM ((yyparse_param_t*) yyparse_param)->pScanner |
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 |
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 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 |
74 |
%type <KeyValList> key_val_list |
%type <KeyValList> key_val_list |
79 |
|
|
80 |
//TODO: return more meaningful error messages |
//TODO: return more meaningful error messages |
81 |
|
|
82 |
input : line |
input : line LF |
|
| input LF line |
|
|
| input CR LF line |
|
|
; |
|
83 |
|
|
84 |
line : /* epsilon (empty line ignored) */ |
line : /* epsilon (empty line ignored) */ { return LSCP_DONE; } |
85 |
| comment |
| comment { return LSCP_DONE; } |
86 |
| command { LSCPSERVER->AnswerClient($1); } |
| command { LSCPSERVER->AnswerClient($1); return LSCP_DONE; } |
87 |
| 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; } |
88 |
; |
; |
89 |
|
|
105 |
| SUBSCRIBE SP subscribe_event { $$ = $3; } |
| SUBSCRIBE SP subscribe_event { $$ = $3; } |
106 |
| UNSUBSCRIBE SP unsubscribe_event { $$ = $3; } |
| UNSUBSCRIBE SP unsubscribe_event { $$ = $3; } |
107 |
| RESET SP CHANNEL SP sampler_channel { $$ = LSCPSERVER->ResetChannel($5); } |
| RESET SP CHANNEL SP sampler_channel { $$ = LSCPSERVER->ResetChannel($5); } |
108 |
| QUIT { LSCPSERVER->AnswerClient("Bye!\r\n"); return 0; } |
| RESET { $$ = LSCPSERVER->ResetSampler(); } |
109 |
|
| QUIT { LSCPSERVER->AnswerClient("Bye!\r\n"); return LSCP_QUIT; } |
110 |
; |
; |
111 |
|
|
112 |
subscribe_event : CHANNELS { $$ = LSCPSERVER->SubscribeNotification(event_channels); } |
subscribe_event : CHANNELS { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_channels); } |
113 |
| VOICE_COUNT { $$ = LSCPSERVER->SubscribeNotification(event_voice_count); } |
| VOICE_COUNT { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_voice_count); } |
114 |
| STREAM_COUNT { $$ = LSCPSERVER->SubscribeNotification(event_stream_count); } |
| STREAM_COUNT { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_stream_count); } |
115 |
| BUFFER_FILL { $$ = LSCPSERVER->SubscribeNotification(event_channel_buffer_fill); } |
| BUFFER_FILL { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_buffer_fill); } |
116 |
| INFO { $$ = LSCPSERVER->SubscribeNotification(event_channel_info); } |
| INFO { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_info); } |
117 |
| MISCELLANEOUS { $$ = LSCPSERVER->SubscribeNotification(event_misc); } |
| MISCELLANEOUS { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_misc); } |
118 |
; |
; |
119 |
|
|
120 |
unsubscribe_event : CHANNELS { $$ = LSCPSERVER->UnsubscribeNotification(event_channels); } |
unsubscribe_event : CHANNELS { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_channels); } |
121 |
| VOICE_COUNT { $$ = LSCPSERVER->UnsubscribeNotification(event_voice_count); } |
| VOICE_COUNT { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_voice_count); } |
122 |
| STREAM_COUNT { $$ = LSCPSERVER->UnsubscribeNotification(event_stream_count); } |
| STREAM_COUNT { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_stream_count); } |
123 |
| BUFFER_FILL { $$ = LSCPSERVER->UnsubscribeNotification(event_channel_buffer_fill); } |
| BUFFER_FILL { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_buffer_fill); } |
124 |
| INFO { $$ = LSCPSERVER->UnsubscribeNotification(event_channel_info); } |
| INFO { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_info); } |
125 |
| MISCELLANEOUS { $$ = LSCPSERVER->UnsubscribeNotification(event_misc); } |
| MISCELLANEOUS { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_misc); } |
126 |
; |
; |
127 |
|
|
128 |
get_instruction : AVAILABLE_ENGINES { $$ = LSCPSERVER->GetAvailableEngines(); } |
get_instruction : AVAILABLE_ENGINES { $$ = LSCPSERVER->GetAvailableEngines(); } |
129 |
| AVAILABLE_MIDI_INPUT_DRIVERS { $$ = LSCPSERVER->GetAvailableMidiInputDrivers(); } |
| AVAILABLE_MIDI_INPUT_DRIVERS { $$ = LSCPSERVER->GetAvailableMidiInputDrivers(); } |
130 |
| MIDI_INPUT_DRIVER SP INFO SP string { $$ = LSCPSERVER->GetMidiInputDriverInfo($5); } |
| MIDI_INPUT_DRIVER SP INFO SP string { $$ = LSCPSERVER->GetMidiInputDriverInfo($5); } |
131 |
| MIDI_INPUT_DRIVER_PARAMETER SP INFO SP string SP string { $$ = LSCPSERVER->GetMidiInputDriverParameterInfo($5, $7); } |
| MIDI_INPUT_DRIVER_PARAMETER SP INFO SP string SP string { $$ = LSCPSERVER->GetMidiInputDriverParameterInfo($5, $7); } |
132 |
| MIDI_INPUT_DRIVER_PARAMETER SP INFO SP string SP string SP key_val_list { $$ = LSCPSERVER->GetMidiInputDriverParameterInfo($5, $7, $9); } |
| MIDI_INPUT_DRIVER_PARAMETER SP INFO SP string SP string SP key_val_list { $$ = LSCPSERVER->GetMidiInputDriverParameterInfo($5, $7, $9); } |
133 |
| AVAILABLE_AUDIO_OUTPUT_DRIVERS { $$ = LSCPSERVER->GetAvailableAudioOutputDrivers(); } |
| AVAILABLE_AUDIO_OUTPUT_DRIVERS { $$ = LSCPSERVER->GetAvailableAudioOutputDrivers(); } |
134 |
| AUDIO_OUTPUT_DRIVER SP INFO SP string { $$ = LSCPSERVER->GetAudioOutputDriverInfo($5); } |
| AUDIO_OUTPUT_DRIVER SP INFO SP string { $$ = LSCPSERVER->GetAudioOutputDriverInfo($5); } |
135 |
| AUDIO_OUTPUT_DRIVER_PARAMETER SP INFO SP string SP string { $$ = LSCPSERVER->GetAudioOutputDriverParameterInfo($5, $7); } |
| AUDIO_OUTPUT_DRIVER_PARAMETER SP INFO SP string SP string { $$ = LSCPSERVER->GetAudioOutputDriverParameterInfo($5, $7); } |
136 |
| AUDIO_OUTPUT_DRIVER_PARAMETER SP INFO SP string SP string SP key_val_list { $$ = LSCPSERVER->GetAudioOutputDriverParameterInfo($5, $7, $9); } |
| AUDIO_OUTPUT_DRIVER_PARAMETER SP INFO SP string SP string SP key_val_list { $$ = LSCPSERVER->GetAudioOutputDriverParameterInfo($5, $7, $9); } |
137 |
| AUDIO_OUTPUT_DEVICES { $$ = LSCPSERVER->GetAudioOutputDeviceCount(); } |
| AUDIO_OUTPUT_DEVICES { $$ = LSCPSERVER->GetAudioOutputDeviceCount(); } |
138 |
| MIDI_INPUT_DEVICES { $$ = LSCPSERVER->GetMidiInputDeviceCount(); } |
| MIDI_INPUT_DEVICES { $$ = LSCPSERVER->GetMidiInputDeviceCount(); } |
139 |
| AUDIO_OUTPUT_DEVICE SP INFO SP NUMBER { $$ = LSCPSERVER->GetAudioOutputDeviceInfo($5); } |
| AUDIO_OUTPUT_DEVICE SP INFO SP NUMBER { $$ = LSCPSERVER->GetAudioOutputDeviceInfo($5); } |
140 |
| MIDI_INPUT_DEVICE SP INFO SP NUMBER { $$ = LSCPSERVER->GetMidiInputDeviceInfo($5); } |
| MIDI_INPUT_DEVICE SP INFO SP NUMBER { $$ = LSCPSERVER->GetMidiInputDeviceInfo($5); } |
141 |
| MIDI_INPUT_PORT SP INFO SP NUMBER SP NUMBER { $$ = LSCPSERVER->GetMidiInputPortInfo($5, $7); } |
| MIDI_INPUT_PORT SP INFO SP NUMBER SP NUMBER { $$ = LSCPSERVER->GetMidiInputPortInfo($5, $7); } |
142 |
| AUDIO_OUTPUT_CHANNEL SP INFO SP NUMBER SP NUMBER { $$ = LSCPSERVER->GetAudioOutputChannelInfo($5, $7); } |
| MIDI_INPUT_PORT_PARAMETER SP INFO SP NUMBER SP NUMBER SP string { $$ = LSCPSERVER->GetMidiInputPortParameterInfo($5, $7, $9); } |
143 |
| AUDIO_OUTPUT_CHANNEL_PARAMETER SP INFO SP NUMBER SP NUMBER SP string { $$ = LSCPSERVER->GetAudioOutputChannelParameterInfo($5, $7, $9); } |
| AUDIO_OUTPUT_CHANNEL SP INFO SP NUMBER SP NUMBER { $$ = LSCPSERVER->GetAudioOutputChannelInfo($5, $7); } |
144 |
| CHANNELS { $$ = LSCPSERVER->GetChannels(); } |
| AUDIO_OUTPUT_CHANNEL_PARAMETER SP INFO SP NUMBER SP NUMBER SP string { $$ = LSCPSERVER->GetAudioOutputChannelParameterInfo($5, $7, $9); } |
145 |
| CHANNEL SP INFO SP sampler_channel { $$ = LSCPSERVER->GetChannelInfo($5); } |
| CHANNELS { $$ = LSCPSERVER->GetChannels(); } |
146 |
| CHANNEL SP BUFFER_FILL SP buffer_size_type SP sampler_channel { $$ = LSCPSERVER->GetBufferFill($5, $7); } |
| CHANNEL SP INFO SP sampler_channel { $$ = LSCPSERVER->GetChannelInfo($5); } |
147 |
| CHANNEL SP STREAM_COUNT SP sampler_channel { $$ = LSCPSERVER->GetStreamCount($5); } |
| CHANNEL SP BUFFER_FILL SP buffer_size_type SP sampler_channel { $$ = LSCPSERVER->GetBufferFill($5, $7); } |
148 |
| CHANNEL SP VOICE_COUNT SP sampler_channel { $$ = LSCPSERVER->GetVoiceCount($5); } |
| CHANNEL SP STREAM_COUNT SP sampler_channel { $$ = LSCPSERVER->GetStreamCount($5); } |
149 |
| ENGINE SP INFO SP engine_name { $$ = LSCPSERVER->GetEngineInfo($5); } |
| CHANNEL SP VOICE_COUNT SP sampler_channel { $$ = LSCPSERVER->GetVoiceCount($5); } |
150 |
; |
| ENGINE SP INFO SP engine_name { $$ = LSCPSERVER->GetEngineInfo($5); } |
151 |
|
; |
152 |
set_instruction : AUDIO_OUTPUT_DEVICE_PARAMETER SP NUMBER SP string EQ param_val { $$ = LSCPSERVER->SetAudioOutputDeviceParameter($3, $5, $7); } |
|
153 |
| AUDIO_OUTPUT_CHANNEL_PARAMETER SP NUMBER SP NUMBER SP string EQ param_val { $$ = LSCPSERVER->SetAudioOutputChannelParameter($3, $5, $7, $9); } |
set_instruction : AUDIO_OUTPUT_DEVICE_PARAMETER SP NUMBER SP string EQ param_val { $$ = LSCPSERVER->SetAudioOutputDeviceParameter($3, $5, $7); } |
154 |
| MIDI_INPUT_DEVICE_PARAMETER SP NUMBER SP string EQ param_val { $$ = LSCPSERVER->SetMidiInputDeviceParameter($3, $5, $7); } |
| AUDIO_OUTPUT_CHANNEL_PARAMETER SP NUMBER SP NUMBER SP string EQ param_val { $$ = LSCPSERVER->SetAudioOutputChannelParameter($3, $5, $7, $9); } |
155 |
| MIDI_INPUT_PORT_PARAMETER SP NUMBER SP NUMBER SP string EQ param_val { $$ = LSCPSERVER->SetMidiInputPortParameter($3, $5, $7, $9); } |
| MIDI_INPUT_DEVICE_PARAMETER SP NUMBER SP string EQ param_val { $$ = LSCPSERVER->SetMidiInputDeviceParameter($3, $5, $7); } |
156 |
|
| MIDI_INPUT_PORT_PARAMETER SP NUMBER SP NUMBER SP string EQ param_val { $$ = LSCPSERVER->SetMidiInputPortParameter($3, $5, $7, $9); } |
157 |
| CHANNEL SP set_chan_instruction { $$ = $3; } |
| CHANNEL SP set_chan_instruction { $$ = $3; } |
158 |
|
| ECHO SP boolean { $$ = LSCPSERVER->SetEcho((yyparse_param_t*) yyparse_param, $3); } |
159 |
; |
; |
160 |
|
|
161 |
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); } |
162 |
| AUDIO_OUTPUT_DEVICE SP string { $$ = LSCPSERVER->CreateAudioOutputDevice($3); } |
| AUDIO_OUTPUT_DEVICE SP string { $$ = LSCPSERVER->CreateAudioOutputDevice($3); } |
163 |
| MIDI_INPUT_DEVICE SP string { $$ = LSCPSERVER->CreateMidiInputDevice($3); } |
| MIDI_INPUT_DEVICE SP string SP key_val_list { $$ = LSCPSERVER->CreateMidiInputDevice($3,$5); } |
164 |
|
| MIDI_INPUT_DEVICE SP string { $$ = LSCPSERVER->CreateMidiInputDevice($3); } |
165 |
; |
; |
166 |
|
|
167 |
destroy_instruction : AUDIO_OUTPUT_DEVICE SP NUMBER { $$ = LSCPSERVER->DestroyAudioOutputDevice($3); } |
destroy_instruction : AUDIO_OUTPUT_DEVICE SP NUMBER { $$ = LSCPSERVER->DestroyAudioOutputDevice($3); } |
168 |
| MIDI_INPUT_DEVICE SP NUMBER { $$ = LSCPSERVER->DestroyMidiInputDevice($3); } |
| MIDI_INPUT_DEVICE SP NUMBER { $$ = LSCPSERVER->DestroyMidiInputDevice($3); } |
169 |
; |
; |
170 |
|
|
171 |
load_instruction : INSTRUMENT SP load_instr_args { $$ = $3; } |
load_instruction : INSTRUMENT SP load_instr_args { $$ = $3; } |
172 |
| ENGINE SP load_engine_args { $$ = $3; } |
| ENGINE SP load_engine_args { $$ = $3; } |
173 |
; |
; |
174 |
|
|
175 |
set_chan_instruction : AUDIO_OUTPUT_DEVICE SP sampler_channel SP NUMBER { $$ = LSCPSERVER->SetAudioOutputDevice($5, $3); } |
set_chan_instruction : AUDIO_OUTPUT_DEVICE SP sampler_channel SP audio_output_device { $$ = LSCPSERVER->SetAudioOutputDevice($5, $3); } |
176 |
| AUDIO_OUTPUT_CHANNEL SP sampler_channel SP audio_output_channel SP audio_output_channel { $$ = LSCPSERVER->SetAudioOutputChannel($5, $7, $3); } |
| AUDIO_OUTPUT_CHANNEL SP sampler_channel SP audio_output_channel SP audio_output_channel { $$ = LSCPSERVER->SetAudioOutputChannel($5, $7, $3); } |
177 |
| AUDIO_OUTPUT_TYPE SP sampler_channel SP audio_output_type { $$ = LSCPSERVER->SetAudioOutputType($5, $3); } |
| AUDIO_OUTPUT_TYPE SP sampler_channel SP audio_output_type { $$ = LSCPSERVER->SetAudioOutputType($5, $3); } |
178 |
| MIDI_INPUT SP sampler_channel SP midi_input_device SP midi_input_port SP midi_input_channel { $$ = LSCPSERVER->SetMIDIInput($5, $7, $9, $3); } |
| MIDI_INPUT SP sampler_channel SP midi_input_device SP midi_input_port SP midi_input_channel { $$ = LSCPSERVER->SetMIDIInput($5, $7, $9, $3); } |
179 |
|
| MIDI_INPUT_DEVICE SP sampler_channel SP midi_input_device { $$ = LSCPSERVER->SetMIDIInputDevice($5, $3); } |
180 |
|
| MIDI_INPUT_PORT SP sampler_channel SP midi_input_port { $$ = LSCPSERVER->SetMIDIInputPort($5, $3); } |
181 |
|
| MIDI_INPUT_CHANNEL SP sampler_channel SP midi_input_channel { $$ = LSCPSERVER->SetMIDIInputChannel($5, $3); } |
182 |
| MIDI_INPUT_TYPE SP sampler_channel SP midi_input_type { $$ = LSCPSERVER->SetMIDIInputType($5, $3); } |
| MIDI_INPUT_TYPE SP sampler_channel SP midi_input_type { $$ = LSCPSERVER->SetMIDIInputType($5, $3); } |
183 |
| VOLUME SP sampler_channel SP volume { $$ = LSCPSERVER->SetVolume($5, $3); } |
| VOLUME SP sampler_channel SP volume { $$ = LSCPSERVER->SetVolume($5, $3); } |
184 |
; |
; |
192 |
; |
; |
193 |
|
|
194 |
list_instruction : AUDIO_OUTPUT_DEVICES { $$ = LSCPSERVER->GetAudioOutputDevices(); } |
list_instruction : AUDIO_OUTPUT_DEVICES { $$ = LSCPSERVER->GetAudioOutputDevices(); } |
195 |
| MIDI_INPUT_DEVICES { $$ = LSCPSERVER->GetMidiInputDevices(); } |
| MIDI_INPUT_DEVICES { $$ = LSCPSERVER->GetMidiInputDevices(); } |
196 |
|
| CHANNELS { $$ = LSCPSERVER->ListChannels(); } |
197 |
|
; |
198 |
|
|
199 |
|
load_instr_args : filename SP instrument_index SP sampler_channel { $$ = LSCPSERVER->LoadInstrument($1, $3, $5); } |
200 |
|
| NON_MODAL SP filename SP instrument_index SP sampler_channel { $$ = LSCPSERVER->LoadInstrument($3, $5, $7, true); } |
201 |
|
; |
202 |
|
|
203 |
|
load_engine_args : engine_name SP sampler_channel { $$ = LSCPSERVER->LoadEngine($1, $3); } |
204 |
; |
; |
205 |
|
|
206 |
load_instr_args : filename SP instrument_index SP sampler_channel { $$ = LSCPSERVER->LoadInstrument($1, $3, $5); } |
audio_output_device : NUMBER |
|
| NON_MODAL SP filename SP instrument_index SP sampler_channel { $$ = LSCPSERVER->LoadInstrument($3, $5, $7, true); } |
|
207 |
; |
; |
208 |
|
|
209 |
load_engine_args : engine_name SP sampler_channel { $$ = LSCPSERVER->LoadEngine($1, $3); } |
audio_output_channel : NUMBER |
210 |
; |
; |
211 |
|
|
212 |
audio_output_type : string |
audio_output_type : string |
234 |
instrument_index : NUMBER |
instrument_index : NUMBER |
235 |
; |
; |
236 |
|
|
|
audio_output_channel : NUMBER |
|
|
; |
|
|
|
|
237 |
engine_name : string |
engine_name : string |
238 |
; |
; |
239 |
|
|
240 |
filename : STRINGVAL |
filename : STRINGVAL |
|
| string |
|
241 |
; |
; |
242 |
|
|
243 |
param_val : STRINGVAL { $$ = $1; } |
param_val : STRINGVAL { $$ = $1; } |
245 |
| DOTNUM { std::stringstream ss; ss << $1; $$ = ss.str(); } |
| DOTNUM { std::stringstream ss; ss << $1; $$ = ss.str(); } |
246 |
; |
; |
247 |
|
|
248 |
|
boolean : NUMBER { $$ = $1; } |
249 |
|
| string { $$ = -1; } |
250 |
|
; |
251 |
|
|
252 |
string : CHAR { std::string s; s = $1; $$ = s; } |
string : CHAR { std::string s; s = $1; $$ = s; } |
253 |
| string CHAR { $$ = $1 + $2; } |
| string CHAR { $$ = $1 + $2; } |
254 |
; |
; |
268 |
void restart(yyparse_param_t* pparam, int& yychar) { |
void restart(yyparse_param_t* pparam, int& yychar) { |
269 |
// restart scanner |
// restart scanner |
270 |
yyrestart(stdin, pparam->pScanner); |
yyrestart(stdin, pparam->pScanner); |
|
// flush input buffer |
|
|
static char buf[1024]; |
|
|
while(recv(hSession, buf, 1024, MSG_DONTWAIT) > 0); |
|
271 |
// reset lookahead symbol |
// reset lookahead symbol |
272 |
yyclearin; |
yyclearin; |
273 |
} |
} |