Re: Functional syntax
Alan Baljeu <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[email protected]> |
Regarding using '.' in a DSL in SWI, I should add: 1) Mostly I would do Atom '.' Atom, so the rewrite doesn't apply, but the present interpretation of a.b as an atom is a problem. I don't understand why it would be an atom either, so I'd hope that changes. 2) Having a separate file with separate syntax is not ideal. I of course want to write tests that employ the syntax, and processing code to employ the syntax. As a practical matter it's nice to grab some lines of code from my language and just drop it on the command line or in a Prolog file and use it. Anyway, all this would be easy if the special '.' syntax were explicitly activated or explicitly turned off. Finally, in the end it isn't critical. In the end I don't need to use '.', and I also don't need the code to be Prolog read-compatible. It's all merely a convenience. >I don't remember the question. To answer, I'm not sure >how: In calling read/2 on my DSL, I want to apply >term_expansion to replace my ./2 with something else. But then how >do I make this NOT happen when program files are loaded? Also >I suppose all tests would have to be written with the alternate >syntax because using . syntax will run into the map system.