|
@@ -46,21 +46,22 @@ void parserCommandList(PASERSSIGNATURE, bool global, bool is_one, Statement *st)
|
|
while (!should_break){
|
|
while (!should_break){
|
|
token_type = readBackToken(pm);
|
|
token_type = readBackToken(pm);
|
|
if (token_type == -3 || token_type == -2)
|
|
if (token_type == -3 || token_type == -2)
|
|
- goto return_;
|
|
|
|
|
|
+ break;
|
|
else if (token_type == MATHER_EOF){
|
|
else if (token_type == MATHER_EOF){
|
|
delToken(pm);
|
|
delToken(pm);
|
|
- goto return_;
|
|
|
|
|
|
+ break;
|
|
}
|
|
}
|
|
else if (token_type == MATHER_ENTER || token_type == MATHER_SEMICOLON){
|
|
else if (token_type == MATHER_ENTER || token_type == MATHER_SEMICOLON){
|
|
delToken(pm);
|
|
delToken(pm);
|
|
- if (!is_one || !have_command)
|
|
|
|
- continue;
|
|
|
|
|
|
+ if (is_one && have_command)
|
|
|
|
+ break;
|
|
}
|
|
}
|
|
else{
|
|
else{
|
|
Token *command_token = NULL;
|
|
Token *command_token = NULL;
|
|
int stop;
|
|
int stop;
|
|
|
|
+ have_command = true;
|
|
if (!callChildToken(CALLPASERSSIGNATURE, parserCommand, COMMAND, &command_token, command_message, command_list_error))
|
|
if (!callChildToken(CALLPASERSSIGNATURE, parserCommand, COMMAND, &command_token, command_message, command_list_error))
|
|
- goto return_;
|
|
|
|
|
|
+ break;
|
|
line = command_token->line;
|
|
line = command_token->line;
|
|
stop = readBackToken(pm);
|
|
stop = readBackToken(pm);
|
|
if (stop == MATHER_ENTER) {
|
|
if (stop == MATHER_ENTER) {
|
|
@@ -81,14 +82,14 @@ void parserCommandList(PASERSSIGNATURE, bool global, bool is_one, Statement *st)
|
|
connectStatement(st, command_token->data.st);
|
|
connectStatement(st, command_token->data.st);
|
|
freeToken(command_token, false);
|
|
freeToken(command_token, false);
|
|
}
|
|
}
|
|
- goto return_;
|
|
|
|
|
|
+ break;
|
|
}
|
|
}
|
|
- have_command = true;
|
|
|
|
connectStatement(st, command_token->data.st);
|
|
connectStatement(st, command_token->data.st);
|
|
freeToken(command_token, false);
|
|
freeToken(command_token, false);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- return_:
|
|
|
|
|
|
+ if (is_one)
|
|
|
|
+ clearLexFile(pm->tm->file);
|
|
signal(SIGINT, bak);
|
|
signal(SIGINT, bak);
|
|
if (pm_KeyInterrupt != signal_reset) {
|
|
if (pm_KeyInterrupt != signal_reset) {
|
|
pm_KeyInterrupt = signal_reset;
|
|
pm_KeyInterrupt = signal_reset;
|