Disambiguation Control

version 7 by Jon Ingold

  • Home page
  • Beginning
  • Previous
  • Next



  • section - i6 routines for accessing the match list

    [
        The match list contains the objects the parser is currently considering for the noun it's thinking about
        We use the following routines for rules that say, "when comparing the x and the y" or "when also considering the k"
    ]

    Include (-

    [ MatchListGuessing;
        return IncludedInMatchList(0);
    ];

    [ IncludedInMatchList
    obj excl_flag
    i
    ;
    if (obj == 0) obj = (+no-object+);

    for (i = 0: i< number_matched : i++)
    { !print " ", (the) match_list-->i;
        if (match_list-->i == obj)
            if (excl_flag == 0 || (excl_flag == 1 && number_matched == 2)) rtrue;
    }

    rfalse;
    ];

    [MatchListEntry N;
        if ( N > number_matched) return (+no-object+);
        return match_list-->(N-1);
    ];

    -).