[DGD] parse_string

Felix A. Croes felix at dworkin.nl
Mon Mar 19 12:28:26 CET 2007


"chris ." <psych_mayo at hotmail.com> wrote:

> To be more specific, i want to know if there is a way to handle my grammar 
> so that my function calling rules will call functions in a different order 
> than the order they appear in.
> Sorry for being vague in my first post.
> Chris Conner

Functions are always called in left-to-right depth-first order.  That is,
if you're using DGD version 1.2.115 or later; earlier versions called
functions in right-to-left order.

What you want is probably something like this:

    Sentence: 'remove' OBJC 'from' OBJI ? remove_contained_object
    OBJI: Object ? find_inv_object
    OBJC: Object

Then remove_contained_object() can call contained_object() with the
proper container as an argument.

Regards,
Dworkin



More information about the DGD mailing list