Changeset 894939e in git


Ignore:
Timestamp:
Feb 11, 2020, 4:31:35 PM (4 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
024d099551e83f0d1d860e67ed16ddf4577dce4c645c77cc0cd67244418581efcd97abbb9c96ea3a
Parents:
99fc84ca6907a6183c70b8fd1bce8b7695bf27ca
Message:
fix syntax: warn if qring q=<ring>
Location:
Singular
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Singular/ipassign.cc

    r99fc84c r894939e  
    164164        jjMINPOLY_red((idhdl)&(L->m[i]));
    165165      }
     166      break;
    166167    }
    167168    default:
     
    11141115* assign a = b
    11151116*/
    1116 static BOOLEAN jiAssign_1(leftv l, leftv r, BOOLEAN toplevel)
     1117static BOOLEAN jiAssign_1(leftv l, leftv r, BOOLEAN toplevel, BOOLEAN is_qring=FALSE)
    11171118{
    11181119  int rt=r->Typ();
     
    11991200#endif
    12001201    return (bb==NULL) || bb->blackbox_Assign(l,r);
     1202  }
     1203  if ((is_qring)
     1204  &&(lt==RING_CMD)
     1205  &&(rt==RING_CMD))
     1206  {
     1207    Warn("qring .. = <ring>; is misleading in >>%s<<",my_yylinebuf);
    12011208  }
    12021209  int start=0;
     
    18351842  int lt=l->Typ();
    18361843  int rt=NONE;
     1844  int is_qring=FALSE;
    18371845  BOOLEAN b=FALSE;
    18381846  if (l->rtyp==ALIAS_CMD)
     
    18441852  {
    18451853    atKillAll((idhdl)l->data);
     1854    is_qring=hasFlag((idhdl)l->data,FLAG_QRING_DEF);
    18461855    IDFLAG((idhdl)l->data)=0;
    18471856    l->attribute=NULL;
     
    19291938      &&((lt==rt)||(lt!=LIST_CMD)))
    19301939      {
    1931         b=jiAssign_1(l,r,toplevel);
     1940        b=jiAssign_1(l,r,toplevel,is_qring);
    19321941        if (l->rtyp==IDHDL)
    19331942        {
  • Singular/ipid.h

    r99fc84c r894939e  
    102102void *idrecDataInit(int t);
    103103
    104 #define FLAG_STD   0
    105 #define FLAG_TWOSTD  3
    106 #define FLAG_QRING   4
     104#define FLAG_STD       0
     105#define FLAG_TWOSTD    3
     106#define FLAG_QRING     4
     107#define FLAG_QRING_DEF 5
    107108#define hasFlag(A,F) Sy_inset((F),(A)->flag)
    108109#define setFlag(A,F) (A)->flag|=Sy_bit(F)
  • Singular/ipshell.cc

    r99fc84c r894939e  
    11261126{
    11271127  BOOLEAN res=FALSE;
     1128  BOOLEAN is_qring=FALSE;
    11281129  const char *id = name->name;
    11291130
     
    11451146      }
    11461147    }
    1147     if (t==QRING_CMD) t=RING_CMD; // qring is always RING_CMD
     1148    if (t==QRING_CMD)
     1149    {
     1150      t=RING_CMD; // qring is always RING_CMD
     1151      is_qring=TRUE;
     1152    }
    11481153
    11491154    if (TEST_V_ALLWARN
     
    11621167      sy->rtyp=IDHDL;
    11631168      currid=sy->name=IDID((idhdl)sy->data);
     1169      if (is_qring)
     1170      {
     1171        IDFLAG((idhdl)sy->data)=sy->flag=Sy_bit(FLAG_QRING_DEF);
     1172      }
    11641173      // name->name=NULL; /* used in enterid */
    11651174      //sy->e = NULL;
Note: See TracChangeset for help on using the changeset viewer.