| 3466 | } |
| 3467 | |
| 3468 | bool smem_parse_chunk(agent* thisAgent, smem_str_to_chunk_map* chunks, smem_chunk_set* newbies) |
| 3469 | { |
| 3470 | bool return_val = false; |
| 3471 | |
| 3472 | smem_chunk* new_chunk = new smem_chunk; |
| 3473 | new_chunk->slots = NULL; |
| 3474 | |
| 3475 | std::string* chunk_name = NULL; |
| 3476 | |
| 3477 | char temp_letter; |
| 3478 | uint64_t temp_number; |
| 3479 | |
| 3480 | bool good_at; |
| 3481 | |
| 3482 | // |
| 3483 | |
| 3484 | // consume left paren |
| 3485 | get_lexeme(thisAgent); |
| 3486 | |
| 3487 | if ((thisAgent->lexeme.type == AT_LEXEME) || (thisAgent->lexeme.type == IDENTIFIER_LEXEME) || (thisAgent->lexeme.type == VARIABLE_LEXEME)) |
| 3488 | { |
| 3489 | good_at = true; |
| 3490 | |
| 3491 | if (thisAgent->lexeme.type == AT_LEXEME) |
| 3492 | { |
| 3493 | get_lexeme(thisAgent); |
| 3494 | |
| 3495 | good_at = (thisAgent->lexeme.type == IDENTIFIER_LEXEME); |
| 3496 | } |
| 3497 | |
| 3498 | if (good_at) |
| 3499 | { |
| 3500 | // save identifier |
| 3501 | chunk_name = smem_parse_lti_name(&(thisAgent->lexeme), &(temp_letter), &(temp_number)); |
| 3502 | new_chunk->lti_letter = temp_letter; |
| 3503 | new_chunk->lti_number = temp_number; |
| 3504 | new_chunk->lti_id = NIL; |
| 3505 | new_chunk->soar_id = NIL; |
| 3506 | new_chunk->slots = new smem_slot_map; |
| 3507 | |
| 3508 | // consume id |
| 3509 | get_lexeme(thisAgent); |
| 3510 | |
| 3511 | // |
| 3512 | |
| 3513 | uint64_t intermediate_counter = 1; |
| 3514 | smem_chunk* intermediate_parent; |
| 3515 | smem_chunk* temp_chunk; |
| 3516 | std::string temp_key; |
| 3517 | std::string* temp_key2; |
| 3518 | Symbol* chunk_attr; |
| 3519 | smem_chunk_value* chunk_value; |
| 3520 | smem_slot* s; |
| 3521 | |
| 3522 | // populate slots |
| 3523 | while (thisAgent->lexeme.type == UP_ARROW_LEXEME) |
| 3524 | { |
| 3525 | intermediate_parent = new_chunk; |
no test coverage detected