Related articles |
---|
Prolog interpreter with flex and bison ... eliasb@dai.ed.ac.uk (Elias Biris) (1997-01-29) |
Re: Prolog interpreter with flex and bison ... dwight@pentasoft.com (1997-02-11) |
From: | Elias Biris <eliasb@dai.ed.ac.uk> |
Newsgroups: | comp.compilers |
Date: | 29 Jan 1997 11:20:24 -0500 |
Organization: | University of Edinburgh |
Keywords: | prolog, question, parse |
Hello,
I am trying to generate an interpreter for a subset of Prolog
using flex and bison ...
My trouble sofar has to do with how to do the variables' binding in a
way similar to Prolog. So, up to now my (f)lexer can understand
variables, predicates and atoms (restrictions apply, you cannot have
the same liberty with a full Prolog interpreter...). These are the
"terminal" symbols of the grammar. The problem is how to make the
parser do the binding ... One idea is that this whould happen by
generating the symbol table with reference of the predicates to the
relevant atoms or variables, but the thing could be much complicated.
Tips would be GRATEFULLY appreciated ... I know that people spent
months or years on the subject, but time is limited for what I am
trying to do.
Regards
elias
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.