Original Parser

version 1 by Ron Newcomb

  • Home page
  • Beginning
  • Previous
  • Next



  • Section 1 - Object Tree and Properties

    To decide what object is the parent of (O - an object): (- parent({O}) -).
    To decide if nothing is in (O - an object): (- children({O}) == 0 -).
    To decide if (obj1 - an object) is directly in (obj2 - an object): (- ({obj1} in {obj2}) -).
    To decide if (obj2 - an object) doesn't have (obj1 - an object): (- ({obj1} notin {obj2}) -).
    To decide if (obj - an object) is a supporter or container: (- ({obj} has supporter or container) -).
    To decide if (obj - an object) can have parts: (- ({obj} provides component_child) -).
    To decide if (obj - an object) provides the property (prop - an either/or property) directly: (- ({obj} has {prop}) -).
    To decide if (obj - an object) does not provide the property (prop - an either/or property) directly: (- ({obj} hasnt {prop}) -).
    To decide what K is the hidden (p - a value of kind K valued property) of (o - an object): (- {o}.{p} -).
    [bug?]
    To decide if the hidden personalized grammar of the person asked is not currently blank:
    (- (actor.grammar ~= 0 or -1) -).

    To decide which either/or property is animate: (-animate-).
    To decide which either/or property is talkable: (-talkable-).
    To decide which understood word valued property is the name list: (-name-).
    To decide what rule valued property is the parse name rule: (-parse_name-).
    To decide what rule valued property is the scope extender: (-add_to_scope-).
    To decide which either/or property is linguistically male: (-male-).
    To decide which either/or property is the default gender for animate things: (-LanguageAnimateGender-).
    To decide which either/or property is the default gender for inanimate things: (-LanguageInanimateGender-).

    [ The scope functions avoid "objectloop" in case movements occur. ]
    To repeat with (loopvar - nonexisting object variable) running through the possessed nodes of (item - an object) begin -- end: (- {-require-ctvs}
        for ( {loopvar} = child({item}) : {loopvar} : {loopvar} = ct_1 )
        { ct_1 = sibling({loopvar}); !-).

    To repeat with (loopvar - nonexisting object variable) running through the incorporated nodes of (item - an object) begin -- end: (- {-require-ctvs}
        for ( {loopvar} = {item}.component_child : {loopvar} : {loopvar} = ct_1 )
        { ct_1 = {loopvar}.component_sibling; !-).