IF-Else in Prolog

D8ece9d65e67a158f31299ed44474d73
0
navred 101 Feb 10, 2005 at 04:44

Hi,
Is it possible to write grammar for If-else in Prolog?
If yes, Please can some one give me a rough idea of the grammar.

Thanks,
SUDHA

1 Reply

Please log in or register to post a reply.

B0b6b897d5ba25971913328e1b7089ce
0
4Dvertex 101 Mar 11, 2005 at 09:50

@navred

Hi,
Is it possible to write grammar for If-else in Prolog?
If yes, Please can some one give me a rough idea of the grammar.

Thanks,
SUDHA

[snapback]15948[/snapback]

What grammar?have and as “,” or “if” as :-

words parsing W in the tree

“A tall man loves this clever woman” :D
W
NP (Nominal phrase) VP (Verbal phrase)

domains
list symbol*.
predicates
sentence(list,list).
noun_phrase(list,list).
verb_phrase(list,list).
adj_noun(list,list).
…………………….
clauses
sentence(List,Rem):-
………………………

Goal: sentence(W). -> true

that all

good parsing