[DGD] Grammar question

Par Winzell zell at skotos.net
Wed May 14 20:31:20 CEST 2003


>> To parse_string() once you've used a constant string, it won't match
>> the more generic tokens that you've defined.
>>
>> Here's a workaround:
>>
>>         whitespace = /[\b\n\r\t ]/
>>         word = /[^\b\n\r\t ]+/
>>         command: 'write' multiword
>>         multiword: Word multiword
>>         multiword: Word
>>
>>         Word: word
>>         Word: 'write'
> 
> 
> Thanks!  That does take care of the problem.  Going back over the parser 
> docs, I see where this behavior is noted, but that sentence didn't 
> really mean anything to me the first time I read it.  Thanks for the 
> expanded explanation.

Dworkin's documentation is like a good novel or classical textbooks: 
they are so dense with information that even after multiple readings and 
a high degree of proficiency with the system, a fresh read-through will 
yield new insights.

Zell


_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list