| | |
| | | context->buffer.position -= totcmdlen; |
| | | totcmdlen = 0; |
| | | } else { |
| | | if (context->parser_state.programHeader.type == SCPI_TOKEN_UNKNOWN) break; |
| | | if (context->parser_state.programHeader.type == SCPI_TOKEN_UNKNOWN |
| | | && context->parser_state.termination == SCPI_MESSAGE_TERMINATION_NONE) break; |
| | | if (totcmdlen >= context->buffer.position) break; |
| | | } |
| | | } |
| | |
| | | for (result = 1; result != 0; result = scpiLex_Comma(state, &tmp)) { |
| | | token->len += result; |
| | | |
| | | if (result == 0) { |
| | | token->type = SCPI_TOKEN_UNKNOWN; |
| | | token->len = 0; |
| | | paramCount = -1; |
| | | break; |
| | | } |
| | | |
| | | result = scpiParser_parseProgramData(state, &tmp); |
| | | if (tmp.type != SCPI_TOKEN_UNKNOWN) { |
| | | token->len += result; |
| | |
| | | break; |
| | | } |
| | | paramCount++; |
| | | } |
| | | |
| | | if (token->len == -1) { |
| | | token->len = 0; |
| | | } |
| | | |
| | | if (numberOfParameters != NULL) { |