| 1491 | ----------------------------------------------------------------- */ |
| 1492 | |
| 1493 | rhs_value parse_rhs_value(agent* thisAgent) |
| 1494 | { |
| 1495 | rhs_value rv; |
| 1496 | |
| 1497 | if (thisAgent->lexeme.type == L_PAREN_LEXEME) |
| 1498 | { |
| 1499 | get_lexeme(thisAgent); |
| 1500 | return parse_function_call_after_lparen(thisAgent, false); |
| 1501 | } |
| 1502 | |
| 1503 | // Check for long term identifier notation |
| 1504 | bool id_lti = parse_lti(thisAgent); |
| 1505 | |
| 1506 | if ((thisAgent->lexeme.type == SYM_CONSTANT_LEXEME) || |
| 1507 | (thisAgent->lexeme.type == INT_CONSTANT_LEXEME) || |
| 1508 | (thisAgent->lexeme.type == FLOAT_CONSTANT_LEXEME) || |
| 1509 | (thisAgent->lexeme.type == VARIABLE_LEXEME) || |
| 1510 | (thisAgent->lexeme.type == IDENTIFIER_LEXEME)) |
| 1511 | { |
| 1512 | // IDENTIFIER_LEXEME only possible if id_lti true due to set_lexer_allow_ids above |
| 1513 | rv = symbol_to_rhs_value(make_symbol_for_current_lexeme(thisAgent, id_lti)); |
| 1514 | get_lexeme(thisAgent); |
| 1515 | return rv; |
| 1516 | } |
| 1517 | print(thisAgent, "Illegal value for RHS value\n"); |
| 1518 | print_location_of_most_recent_lexeme(thisAgent); |
| 1519 | return NULL; |
| 1520 | } |
| 1521 | |
| 1522 | |
| 1523 | /* ----------------------------------------------------------------- |
no test coverage detected