misc/lemon.c
changeset 832 375ac4fcdc51
parent 831 80e47b096ecd
child 833 cd7c278acf02
equal deleted inserted replaced
831:80e47b096ecd 832:375ac4fcdc51
  2322       }
  2322       }
  2323       break;
  2323       break;
  2324     case WAITING_FOR_DESTRUCTOR_SYMBOL:
  2324     case WAITING_FOR_DESTRUCTOR_SYMBOL:
  2325       if( !isalpha(x[0]) ){
  2325       if( !isalpha(x[0]) ){
  2326         ErrorMsg(psp->filename,psp->tokenlineno,
  2326         ErrorMsg(psp->filename,psp->tokenlineno,
  2327           "Symbol name missing after %destructor keyword");
  2327           "Symbol name missing after %%destructor keyword");
  2328         psp->errorcnt++;
  2328         psp->errorcnt++;
  2329         psp->state = RESYNC_AFTER_DECL_ERROR;
  2329         psp->state = RESYNC_AFTER_DECL_ERROR;
  2330       }else{
  2330       }else{
  2331         struct symbol *sp = Symbol_new(x);
  2331         struct symbol *sp = Symbol_new(x);
  2332         psp->declargslot = &sp->destructor;
  2332         psp->declargslot = &sp->destructor;
  2351         break;
  2351         break;
  2352 #endif
  2352 #endif
  2353     case WAITING_FOR_DATATYPE_SYMBOL:
  2353     case WAITING_FOR_DATATYPE_SYMBOL:
  2354       if( !isalpha(x[0]) ){
  2354       if( !isalpha(x[0]) ){
  2355         ErrorMsg(psp->filename,psp->tokenlineno,
  2355         ErrorMsg(psp->filename,psp->tokenlineno,
  2356           "Symbol name missing after %destructor keyword");
  2356           "Symbol name missing after %%type keyword");
  2357         psp->errorcnt++;
  2357         psp->errorcnt++;
  2358         psp->state = RESYNC_AFTER_DECL_ERROR;
  2358         psp->state = RESYNC_AFTER_DECL_ERROR;
  2359       }else{
  2359       }else{
  2360         struct symbol *sp = Symbol_new(x);
  2360         struct symbol *sp = Symbol_new(x);
  2361         psp->declargslot = &sp->datatype;
  2361         psp->declargslot = &sp->datatype;