MCPcopy Create free account
hub / github.com/SoarGroup/Soar / parse_relational_test

Function parse_relational_test

Core/SoarKernel/src/parser.cpp:366–451  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

364----------------------------------------------------------------- */
365
366test parse_relational_test(agent* thisAgent)
367{
368 byte test_type;
369 bool use_equality_test;
370 test t;
371 Symbol* referent;
372 complex_test* ct;
373
374 use_equality_test = false;
375 test_type = NOT_EQUAL_TEST; /* unnecessary, but gcc -Wall warns without it */
376
377 /* --- read optional relation symbol --- */
378 switch (thisAgent->lexeme.type)
379 {
380 case EQUAL_LEXEME:
381 use_equality_test = true;
382 get_lexeme(thisAgent);
383 break;
384
385 case NOT_EQUAL_LEXEME:
386 test_type = NOT_EQUAL_TEST;
387 get_lexeme(thisAgent);
388 break;
389
390 case LESS_LEXEME:
391 test_type = LESS_TEST;
392 get_lexeme(thisAgent);
393 break;
394
395 case GREATER_LEXEME:
396 test_type = GREATER_TEST;
397 get_lexeme(thisAgent);
398 break;
399
400 case LESS_EQUAL_LEXEME:
401 test_type = LESS_OR_EQUAL_TEST;
402 get_lexeme(thisAgent);
403 break;
404
405 case GREATER_EQUAL_LEXEME:
406 test_type = GREATER_OR_EQUAL_TEST;
407 get_lexeme(thisAgent);
408 break;
409
410 case LESS_EQUAL_GREATER_LEXEME:
411 test_type = SAME_TYPE_TEST;
412 get_lexeme(thisAgent);
413 break;
414
415 default:
416 use_equality_test = true;
417 break;
418 }
419
420 // Check for long term identifier notation
421 bool id_lti = parse_lti(thisAgent);
422
423 /* --- read variable or constant --- */

Callers 1

parse_simple_testFunction · 0.85

Calls 8

get_lexemeFunction · 0.85
parse_ltiFunction · 0.85
allocate_with_poolFunction · 0.85
printFunction · 0.85

Tested by

no test coverage detected