MCPcopy Create free account
hub / github.com/NGSolve/ngsolve / ParseExpression

Method ParseExpression

ngstd/evalfunc.cpp:562–612  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

560
561
562 EvalFunction::ResultType EvalFunction :: ParseExpression ()
563 {
564 ResultType result = ParseSubExpression ();
565
566 while (1)
567 {
568 switch (GetToken())
569 {
570 case GREATER:
571 {
572 ReadNext();
573 ParseSubExpression ();
574 AddOperation (GREATER);
575 break;
576 }
577 case GREATEREQUAL:
578 {
579 ReadNext();
580 ParseSubExpression ();
581 AddOperation (GREATEREQUAL);
582 break;
583 }
584 case EQUAL:
585 {
586 ReadNext();
587 ParseSubExpression ();
588 AddOperation (EQUAL);
589 break;
590 }
591 case LESSEQUAL:
592 {
593 ReadNext();
594 ParseSubExpression ();
595 AddOperation (LESSEQUAL);
596 break;
597 }
598 case LESS:
599 {
600 ReadNext();
601 ParseSubExpression ();
602 AddOperation (LESS);
603 break;
604 }
605 default:
606 {
607 return result;
608 }
609 }
610 }
611 return result;
612 }
613
614
615

Callers

nothing calls this directly

Calls 2

GetTokenFunction · 0.85
AddOperationFunction · 0.85

Tested by

no test coverage detected