Inform - Support - Source

Back to List

Inventory
Complete

Backward
Forward

Plain
Coloured
Gaudy

This code
in plain text

Browsing parserm.h

Descriptors (lines 1489-1544)

1489  [ Descriptors allow_multiple  o x flag cto type n;
1490   
1491     ResetDescriptors();
1492     if (wn > num_words) return 0;
1493   
1494     for (flag=true:flag:)
1495     {   o=NextWordStopped(); flag=false;
1496   
1497         for (x=1:x<=LanguageDescriptors-->0:x=x+4)
1498             if (o == LanguageDescriptors-->x)
1499             {   flag = true;
1500                 type = LanguageDescriptors-->(x+2);
1501                 if (type ~= DEFART_PK) indef_mode = true;
1502                 indef_possambig = true;
1503                 indef_cases = indef_cases & (LanguageDescriptors-->(x+1));
1504   
1505                 if (type == POSSESS_PK)
1506                 {   cto = LanguageDescriptors-->(x+3);
1507                     switch(cto)
1508                     {  0: indef_type = indef_type | MY_BIT;
1509                        1: indef_type = indef_type | THAT_BIT;
1510                        default: indef_owner = PronounValue(cto);
1511                          if (indef_owner == NULL) indef_owner = InformParser;
1512                     }
1513                 }
1514   
1515                 if (type == light)
1516                     indef_type = indef_type | LIT_BIT;
1517                 if (type == -light)
1518                     indef_type = indef_type | UNLIT_BIT;
1519             }
1520   
1521         if (o==OTHER1__WD or OTHER2__WD or OTHER3__WD)
1522                              { indef_mode=1; flag=1;
1523                                indef_type = indef_type | OTHER_BIT; }
1524         if (o==ALL1__WD or ALL2__WD or ALL3__WD or ALL4__WD or ALL5__WD)
1525                              { indef_mode=1; flag=1; indef_wanted=100;
1526                                if (take_all_rule == 1)
1527                                    take_all_rule = 2;
1528                                indef_type = indef_type | PLURAL_BIT; }
1529         if (allow_plurals && allow_multiple)
1530         {   n=TryNumber(wn-1);
1531             if (n==1)        { indef_mode=1; flag=1; }
1532             if (n>1)         { indef_guess_p=1;
1533                                indef_mode=1; flag=1; indef_wanted=n;
1534                                indef_nspec_at=wn-1;
1535                                indef_type = indef_type | PLURAL_BIT; }
1536         }
1537         if (flag==1
1538             && NextWordStopped() ~= OF1__WD or OF2__WD or OF3__WD or OF4__WD)
1539             wn--;  ! Skip 'of' after these
1540     }
1541     wn--;
1542     if ((indef_wanted > 0) && (~~allow_multiple)) return MULTI_PE;
1543     return 0;
1544  ];


Last updated 27 February 2004. This web site has not been fully supported since April 2008. Information may be out of date. This page was originally managed by Graham Nelson (graham@gnelson.demon.co.uk) assisted by C Knight.