Changeset f09a99 in git


Ignore:
Timestamp:
May 5, 2014, 1:50:13 PM (10 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'fc741b6502fd8a97288eaa3eba6e5220f3c3df87')
Children:
508d46c825fbaedc044e70aed39323c9230fa353
Parents:
f0cd66c1f26eeb797e2b9d7e5427eefb62882e07
Message:
chg: allow in newstruct definition: white space, alnum member names
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/newstruct.cc

    rf0cd66c rf09a99  
    700700  {
    701701    // read type:
    702     while (*p==' ') p++;
     702    while ((*p!='\0') && (*p<=' ')) p++;
    703703    start=p;
    704     while (isalpha(*p)) p++;
     704    while (isalnum(*p)) p++;
    705705    *p='\0';
    706706    IsCmd(start,t);
     
    719719    // read name:
    720720    p++;
    721     while (*p==' ') p++;
     721    while ((*p!='\0') && (*p<=' ')) p++;
    722722    start=p;
    723     while (isalpha(*p)) p++;
     723    while (isalnum(*p)) p++;
    724724    c=*p;
    725725    *p='\0';
    726726    elem->typ=t;
    727727    elem->pos=res->size;
    728     if (*start=='\0') /*empty name*/
    729     {
    730       WerrorS("empty name for element");
     728    if ((*start=='\0') /*empty name*/||(isdigit(*start)))
     729    {
     730      WerrorS("illegal/empty name for element");
    731731      goto error_in_newstruct_def;
    732732    }
     
    739739    // next ?
    740740    *p=c;
    741     while (*p==' ') p++;
     741    while ((*p!='\0') && (*p<=' ')) p++;
    742742    if (*p!=',')
    743743    {
Note: See TracChangeset for help on using the changeset viewer.