Changeset 239a237 in tol


Ignore:
Timestamp:
Dec 27, 2010, 3:38:01 PM (16 years ago)
Author:
Víctor de Buen <vdebuen@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
f01ced8c
Parents:
6306f69
Message:

Fixes #1043

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@2956 be4846ae-f051-483a-831f-b64e7d08527f

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tol/btol/bgrammar/spfuninst.cpp

    r6306f69 r239a237  
    448448    if(args.Card()==1)
    449449    {
    450         result  = gra->EvaluateExpr(Text(args[1]));
     450      const BText& expr = Text(args[1]);
     451      if(gra==GraAnything())
     452      {
     453        int posBlank = expr.Find(" ");
     454        if(posBlank>0)
     455        {
     456          BText usedGraNam(expr,0,posBlank-1);
     457          BGrammar* usedGra = BGrammar::FindByName(usedGraNam,false);
     458          if(usedGra)
     459          { 
     460            result = usedGra->EvaluateExpr(expr);
     461          }
     462        }
     463      }
     464            if(!result)
     465      {
     466        result = gra->EvaluateExpr(expr);
     467      }
    451468    }
    452469    result=BSpecialFunction::TestResult(_name_,result,tre,gra->Defect(),BTRUE);
Note: See TracChangeset for help on using the changeset viewer.