Re: term_expansion/2 with DCG clauses
"Richard A. O'Keefe" <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[email protected]> |
On 14/08/2013, at 3:44 AM, Jan Wielemaker wrote: > This seems a logical way to access DCG expansion. The only price is that > you cannot created rules for -->/2 (nor for []/0 and ./2). Do these > systems have an agreed way to creates DCGs from expansion rules? I guess > Richard will know the rationale for not doing DCG after user expansion. If I recall correctly, DCG expansion was done *before* user expansion. With there being no goal_expansion in those days, this was important if you wanted users to be able to plug their own goal_expansion code in and have it apply to the result of DCG expansion. Further, DCG expansion was available as library code, so if you wanted it, you could very easily call it yourself.