[REBOL] Re: Generating words and global variable space
From: dankelg8:cs:man:ac at: 23-Mar-2001 17:04
On Fri, 23 Mar 2001, Marcus Petersson wrote:
> On Thu, 22 Mar 2001, Gisle Dankel wrote:
> > I'm writing a simple Prolog interpreter where the format of the rules are
> Interesting. May I ask how you define the parse rules, by hand or by using
> some predefined BNF description? I wouldn't hope for the latter, imagining
> that as a relational language, Prolog doesn't have a large syntax.
Hm, not sure what you mean here.
Prolog requires almost no parsing.
I have defined some rules for 'parse that validates a prolog program, and
they are a few lines in BNF style.
A prolog interpreter is not difficult to implement either if it's done in
a straightforward way.
I'll release it later along with the rest of my project. Maybe someone
knows how to implement a Warren abstract machine or something similar?
I can solve the variable problem temporarily by using a datatype like
money! or tuple! instead of word!.
But that means you can't write prolog programs with those types..
It's quite interesting to mix rebol with prolog.
Rebol can for example generate facts for prolog, which makes it much
easier to reason about models which are cumbersome to write in prolog.