[DGD] parse_string
Felix A. Croes
felix at dworkin.nl
Tue Aug 28 03:39:24 CEST 2001
Thomas Conner Annandale <gte829m at prism.gatech.edu> wrote:
> If I'm just missing something obvious, I apologize, but I'm having trouble
> with parse_string. First, it seems to always return nil, and second, I
> can't seem to get recursive rules to work. For example, if I use this
> grammar (in /tmp/grammar)...
>
> one = /a/
> loop : one ? write1
> loop : loop one ? write1
>
> ... and then call
>
> write2(as_string(parse_string(read_file("/tmp/grammar"),"aa")));
>
> I get this output:
>
> write1: ({ "a" })
> write2: nil
>
> Am I doing something wrong?
The write1 function should return its argument.
Regards,
Dworkin
_________________________________________________________________
List config page: http://list.imaginary.com/mailman/listinfo/dgd
More information about the DGD
mailing list