Re: Issue with creating a meta-interpreater
"Richard A. O'Keefe" <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[email protected]> |
On 30/03/2014, at 3:02 PM, banky97 wrote:
> Hi guys. I am new to prolog and I need to create a meta-interpreater for this
> attached biological grammer. Any help will be much appreciated.
> Thanks grammar_simple.BAK
> <http://swi-prolog.996271.n3.nabble.com/file/n14623/grammar_simple.BAK>
(1) A file name ending with .BAK looks like something created by
a text editor as a backup when creating a more recent version.
Did you send the right file?
(2) Was the grammar (note the absence of an "e" in "grammar")
written in that style to begin with, or was it written as
a DCG?
prec(A,B):-
sigpep(A, C),
star(C, D),
neuro_peptide(D, E),
star(E, B).
neuro_peptide(D, E):-
start(D, F),
middle(F, G),
end(G, E).
would be clearer as
prec --> sigpep, star, neuro_peptide, star.
neuro_peptide --> start, middle, end.
and so on.
(3) Writing a meta-interpreter is pretty easy,
but what is it *for*? What is it to *do*?